Add update_debugger_support for x86 and fix ModBasket.
Made a constructor for struct ModBasket rather than using memset(0).
This was causing problems when setting the std::string className field
on the host.
Change-Id: Ie8fa08d0c9f01b029db88c8a309e54283b00b497
diff --git a/src/jdwp/jdwp_event.cc b/src/jdwp/jdwp_event.cc
index 8b3964a..8be3451 100644
--- a/src/jdwp/jdwp_event.cc
+++ b/src/jdwp/jdwp_event.cc
@@ -107,6 +107,9 @@
* The rest will be zeroed.
*/
struct ModBasket {
+ ModBasket() : pLoc(NULL), threadId(0), classId(0), excepClassId(0),
+ caught(false), field(0), thisPtr(0) { }
+
const JdwpLocation* pLoc; /* LocationOnly */
std::string className; /* ClassMatch/ClassExclude */
ObjectId threadId; /* ThreadOnly */
@@ -720,7 +723,6 @@
bool JdwpState::PostLocationEvent(const JdwpLocation* pLoc, ObjectId thisPtr, int eventFlags) {
ModBasket basket;
- memset(&basket, 0, sizeof(basket));
basket.pLoc = pLoc;
basket.classId = pLoc->class_id;
basket.thisPtr = thisPtr;
@@ -821,7 +823,6 @@
}
ModBasket basket;
- memset(&basket, 0, sizeof(basket));
basket.threadId = threadId;
ExpandBuf* pReq = NULL;
@@ -898,7 +899,6 @@
const JdwpLocation* pCatchLoc, ObjectId thisPtr) {
ModBasket basket;
- memset(&basket, 0, sizeof(basket));
basket.pLoc = pThrowLoc;
basket.classId = pThrowLoc->class_id;
basket.threadId = Dbg::GetThreadSelfId();
@@ -973,7 +973,6 @@
int status) {
ModBasket basket;
- memset(&basket, 0, sizeof(basket));
basket.classId = refTypeId;
basket.threadId = Dbg::GetThreadSelfId();
basket.className = Dbg::GetClassName(basket.classId);