Wire up enough of the pieces that we can connect ddms or jdb.
(And die with an UNIMPLEMENTED as soon as they connect, of course.)
Change-Id: I9abb25d581384361c215b3cd96b8278c751e79ea
diff --git a/src/jdwp/jdwp.h b/src/jdwp/jdwp.h
index 1c205bc..8455ba5 100644
--- a/src/jdwp/jdwp.h
+++ b/src/jdwp/jdwp.h
@@ -93,9 +93,8 @@
JdwpTransportType transport;
bool server;
bool suspend;
- char host[64];
+ std::string host;
short port;
- /* more will be here someday */
};
/*
diff --git a/src/jdwp/jdwp_main.cc b/src/jdwp/jdwp_main.cc
index f2ff937..c9dac64 100644
--- a/src/jdwp/jdwp_main.cc
+++ b/src/jdwp/jdwp_main.cc
@@ -311,7 +311,7 @@
android_atomic_release_store(true, &state->debug_thread_started_);
state->thread_start_lock_.Lock();
- state->thread_start_cond_.Wait(state->thread_start_lock_);
+ state->thread_start_cond_.Broadcast();
state->thread_start_lock_.Unlock();
/* set the thread state to VMWAIT so GCs don't wait for us */
diff --git a/src/jdwp/jdwp_socket.cc b/src/jdwp/jdwp_socket.cc
index b4062d0..55bc1b4 100644
--- a/src/jdwp/jdwp_socket.cc
+++ b/src/jdwp/jdwp_socket.cc
@@ -407,14 +407,14 @@
struct hostent he;
char auxBuf[128];
int error;
- int cc = gethostbyname_r(state->params.host, &he, auxBuf, sizeof(auxBuf), &pEntry, &error);
+ int cc = gethostbyname_r(state->params.host.c_str(), &he, auxBuf, sizeof(auxBuf), &pEntry, &error);
if (cc != 0) {
LOG(WARNING) << "gethostbyname_r('" << state->params.host << "') failed: " << hstrerror(error);
return false;
}
#else
h_errno = 0;
- pEntry = gethostbyname(state->params.host);
+ pEntry = gethostbyname(state->params.host.c_str());
if (pEntry == NULL) {
PLOG(WARNING) << "gethostbyname('" << state->params.host << "') failed";
return false;