Read JDWP options from runtime
Allocates JDWP::JdwpOptions on the heap and copies parsed options to
avoid the need to include jdwp/jdwp.h into runtime.h file.
Also does some minor cleanup and removes the old JDWP options parsing
code that became dead code after we move it to the new command-line
parser.
Bug: 19275792
Change-Id: I71901c89fbf2cc3c1901a089e2a98b4326c6ee70
diff --git a/runtime/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
index 6464a62..9f37998 100644
--- a/runtime/jdwp/jdwp.h
+++ b/runtime/jdwp/jdwp.h
@@ -101,11 +101,11 @@
std::ostream& operator<<(std::ostream& os, const JdwpTransportType& rhs);
struct JdwpOptions {
- JdwpTransportType transport;
- bool server;
- bool suspend;
- std::string host;
- uint16_t port;
+ JdwpTransportType transport = kJdwpTransportUnknown;
+ bool server = false;
+ bool suspend = false;
+ std::string host = "";
+ uint16_t port = static_cast<uint16_t>(-1);
};
bool operator==(const JdwpOptions& lhs, const JdwpOptions& rhs);