Prepare field watchpoint support
Adds field read/write events in the instrumentation. The debugger now registers
as a listener for these events so JDWP field access and field modification
events can be reported.
This CL will be followed by another one to report these events from the
interpreter. Therefore no JDWP field access and field modification events
can be sent for now.
Bug: 8267708
Change-Id: If2a93eb590805567d69015c83cce9cd2ab712cbd
diff --git a/runtime/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
index 66ebb96..1477324 100644
--- a/runtime/jdwp/jdwp.h
+++ b/runtime/jdwp/jdwp.h
@@ -197,6 +197,17 @@
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
/*
+ * A field of interest has been accessed or modified. This is used for field access and field
+ * modification events.
+ *
+ * "fieldValue" is non-null for field modification events only.
+ * "is_modification" is true for field modification, false for field access.
+ */
+ bool PostFieldEvent(const JdwpLocation* pLoc, RefTypeId typeId, FieldId fieldId,
+ ObjectId thisPtr, const JValue* fieldValue, bool is_modification)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+ /*
* An exception has been thrown.
*
* Pass in a zeroed-out "*pCatchLoc" if the exception wasn't caught.