summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/thread.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/thread.cc b/src/thread.cc
index 16b8b67a41..e2646004c5 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -968,14 +968,14 @@ void Thread::WalkStack(StackVisitor* visitor) const {
while (frame.GetSP() != 0) {
for ( ; frame.GetMethod() != 0; frame.Next()) {
+ DCHECK(frame.GetMethod()->IsWithinCode(pc));
+ visitor->VisitFrame(frame, pc);
+ pc = frame.GetReturnPC();
// Move the PC back 2 bytes as a call will frequently terminate the
// decoding of a particular instruction and we want to make sure we
// get the Dex PC of the instruction with the call and not the
// instruction following.
if (pc > 0) { pc -= 2; }
- DCHECK(frame.GetMethod()->IsWithinCode(pc));
- visitor->VisitFrame(frame, pc);
- pc = frame.GetReturnPC();
}
if (record == NULL) {
break;
@@ -993,14 +993,14 @@ void Thread::WalkStackUntilUpCall(StackVisitor* visitor, bool include_upcall) co
if (frame.GetSP() != 0) {
for ( ; frame.GetMethod() != 0; frame.Next()) {
+ DCHECK(frame.GetMethod()->IsWithinCode(pc));
+ visitor->VisitFrame(frame, pc);
+ pc = frame.GetReturnPC();
// Move the PC back 2 bytes as a call will frequently terminate the
// decoding of a particular instruction and we want to make sure we
// get the Dex PC of the instruction with the call and not the
// instruction following.
if (pc > 0) { pc -= 2; }
- DCHECK(frame.GetMethod()->IsWithinCode(pc));
- visitor->VisitFrame(frame, pc);
- pc = frame.GetReturnPC();
}
if (include_upcall) {
visitor->VisitFrame(frame, pc);