OSDN Git Service

Fix access to FP registers when visiting stack
authorSebastien Hertz <shertz@google.com>
Fri, 13 Jun 2014 12:49:27 +0000 (14:49 +0200)
committerSebastien Hertz <shertz@google.com>
Tue, 17 Jun 2014 09:13:03 +0000 (11:13 +0200)
commitaa9b3aee1e06f922e4518713f9b3dff00a0b2597
tree992b4565732a728dd901ed8a2f29c9246de328b7
parentbc72903b909f5147b8cb207f3e5d02a8ef85e4e7
Fix access to FP registers when visiting stack

Adds GetFPR and SetFPR to Context class so we can read from and write to
floating-point registers during stack visit. They return a boolean flag
indicating whether the read/write is successful. This allows the debugger to
return the JDWP error ABSENT_INFORMATION when we can't read/write a register.
We also update GetGPR and SetGPR for consistency. We keep a default GetGPR
implementation asserting the read was successful using a CHECK so we don't
silently fail.

Adds missing JDWP object tags for StackFrame.SetValues to avoid crash when
setting corresponding objects (thread, thread group, class object or class
loader). Also returns JDWP error INVALID_OBJECT (when the given object id is
invalid) instead of crashing with an unimplemented message.

Bug: 15433097
Change-Id: I70843c9280e694aec1eae5cf6f2dc155cb9ea10e
14 files changed:
runtime/arch/arm/context_arm.cc
runtime/arch/arm/context_arm.h
runtime/arch/arm64/context_arm64.cc
runtime/arch/arm64/context_arm64.h
runtime/arch/context.h
runtime/arch/mips/context_mips.cc
runtime/arch/mips/context_mips.h
runtime/arch/x86/context_x86.cc
runtime/arch/x86/context_x86.h
runtime/arch/x86_64/context_x86_64.cc
runtime/arch/x86_64/context_x86_64.h
runtime/debugger.cc
runtime/stack.cc
runtime/stack.h