summaryrefslogtreecommitdiffstats
path: root/src/debugger.cc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-04-11 17:43:37 -0700
committerElliott Hughes <enh@google.com>2012-04-11 17:43:37 -0700
commitf24d3cedd395690f6904aaac80f84a100420f7a3 (patch)
tree1867ff0b6f3bebb4f611eaf72b05b14843c55d93 /src/debugger.cc
parent14fe6aea00598ba5d40d3e5bfa62f26a1c8cfdff (diff)
downloadart-f24d3cedd395690f6904aaac80f84a100420f7a3.zip
art-f24d3cedd395690f6904aaac80f84a100420f7a3.tar.gz
art-f24d3cedd395690f6904aaac80f84a100420f7a3.tar.bz2
Enforce the use of accessors on JValue so we can ensure sign extension.
Change-Id: I34810af7661d8674c84707afe5cfdf9e2c233f8b
Diffstat (limited to 'src/debugger.cc')
-rw-r--r--src/debugger.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/debugger.cc b/src/debugger.cc
index fbcd420..553bfc7 100644
--- a/src/debugger.cc
+++ b/src/debugger.cc
@@ -2216,9 +2216,9 @@ JDWP::JdwpError Dbg::InvokeMethod(JDWP::ObjectId threadId, JDWP::ObjectId object
// Copy the result.
*pResultTag = req->result_tag;
if (IsPrimitiveTag(req->result_tag)) {
- *pResultValue = req->result_value.j;
+ *pResultValue = req->result_value.GetJ();
} else {
- *pResultValue = gRegistry->Add(req->result_value.l);
+ *pResultValue = gRegistry->Add(req->result_value.GetL());
}
*pExceptionId = req->exception;
return req->error;
@@ -2257,10 +2257,10 @@ void Dbg::ExecuteMethod(DebugInvokeReq* pReq) {
Object* exc = self->GetException();
VLOG(jdwp) << " JDWP invocation returning with exception=" << exc << " " << PrettyTypeOf(exc);
self->ClearException();
- pReq->result_value.j = 0;
+ pReq->result_value.SetJ(0);
} else if (pReq->result_tag == JDWP::JT_OBJECT) {
/* if no exception thrown, examine object result more closely */
- JDWP::JdwpTag new_tag = TagFromObject(pReq->result_value.l);
+ JDWP::JdwpTag new_tag = TagFromObject(pReq->result_value.GetL());
if (new_tag != pReq->result_tag) {
VLOG(jdwp) << " JDWP promoted result from " << pReq->result_tag << " to " << new_tag;
pReq->result_tag = new_tag;
@@ -2275,7 +2275,7 @@ void Dbg::ExecuteMethod(DebugInvokeReq* pReq) {
* We can't use the "tracked allocation" mechanism here because
* the object is going to be handed off to a different thread.
*/
- gRegistry->Add(pReq->result_value.l);
+ gRegistry->Add(pReq->result_value.GetL());
}
if (old_exception.get() != NULL) {