Give WalkStack's callback a way to terminate early.
Also combine WalkStack and WalkStackUntilUpcall.
Change-Id: Ida25665de72e5fd8e17946886a387b27cf841457
diff --git a/src/jdwp/jdwp_handler.cc b/src/jdwp/jdwp_handler.cc
index 284ca64..9fb8ad0 100644
--- a/src/jdwp/jdwp_handler.cc
+++ b/src/jdwp/jdwp_handler.cc
@@ -976,6 +976,8 @@
for (uint32_t i = start_frame; i < (start_frame + length); ++i) {
FrameId frameId;
JdwpLocation loc;
+ // TODO: switch to GetThreadFrames so we don't have to search for each frame
+ // even though we only want them in order.
Dbg::GetThreadFrame(threadId, i, &frameId, &loc);
expandBufAdd8BE(pReply, frameId);