art: Refactor RuntimeOptions/ParsedOptions
Refactor the RuntimeOptions to be a
type-safe map (VariantMap, see runtime_options.h) and the ParsedOptions
to delegate the parsing to CmdlineParser (see cmdline/cmdline_parser.h).
This is the start of a command line parsing refactor, and may include
more in the future (dex2oat, patchoat, etc).
For more details of the command line parsing generator usage see cmdline/README.md
Change-Id: Ic67c6bca5e1f33bf2ec60e2e3ff8c366bab91563
diff --git a/runtime/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
index 9309ab5..6464a62 100644
--- a/runtime/jdwp/jdwp.h
+++ b/runtime/jdwp/jdwp.h
@@ -108,6 +108,8 @@
uint16_t port;
};
+bool operator==(const JdwpOptions& lhs, const JdwpOptions& rhs);
+
struct JdwpEvent;
class JdwpNetStateBase;
struct ModBasket;
diff --git a/runtime/jdwp/jdwp_main.cc b/runtime/jdwp/jdwp_main.cc
index 40211de..b04aa6e 100644
--- a/runtime/jdwp/jdwp_main.cc
+++ b/runtime/jdwp/jdwp_main.cc
@@ -619,6 +619,18 @@
return !(lhs == rhs);
}
+bool operator==(const JdwpOptions& lhs, const JdwpOptions& rhs) {
+ if (&lhs == &rhs) {
+ return true;
+ }
+
+ return lhs.transport == rhs.transport &&
+ lhs.server == rhs.server &&
+ lhs.suspend == rhs.suspend &&
+ lhs.host == rhs.host &&
+ lhs.port == rhs.port;
+}
+
} // namespace JDWP
} // namespace art