diff options
author | Jason Molenda <jmolenda@apple.com> | 2015-07-16 03:42:40 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2015-07-16 03:42:40 +0000 |
commit | d25d72fb795c8003fbfeb5465392ab8cd90bb6bd (patch) | |
tree | 871114975f800a61018506571450b04af709ee97 | |
parent | 86a86cf7250cc3857b89df22c525c7b456cb1e65 (diff) | |
download | bcm5719-llvm-d25d72fb795c8003fbfeb5465392ab8cd90bb6bd.tar.gz bcm5719-llvm-d25d72fb795c8003fbfeb5465392ab8cd90bb6bd.zip |
Only include the stack memory for the caller stack
frame, don't go any further, in RNBRemote::SendStopReplyPacketForThread.
These are the memory pre-fetches in the T05 packet and are
included in every private stop that lldb does. lldb needs, at most,
the caller stack frame so we're sending more data than needed by
including additional stack memory prefetches in this reply packet.
Once we've stopped for a public stop, we're going to do a jThreadsInfo
which will include the stack memory prefetches for all threads,
including the one which had the stop reason.
llvm-svn: 242380
-rw-r--r-- | lldb/tools/debugserver/source/RNBRemote.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index a0bbe1316d0..b273fce5bad 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -2573,7 +2573,7 @@ typedef std::map<nub_addr_t, StackMemory> StackMemoryMap; static void -ReadStackMemory (nub_process_t pid, nub_thread_t tid, StackMemoryMap &stack_mmap) +ReadStackMemory (nub_process_t pid, nub_thread_t tid, StackMemoryMap &stack_mmap, uint32_t backtrace_limit = 256) { DNBRegisterValue reg_value; if (DNBThreadGetRegisterValueByID(pid, tid, REGISTER_SET_GENERIC, GENERIC_REGNUM_FP, ®_value)) @@ -2588,7 +2588,7 @@ ReadStackMemory (nub_process_t pid, nub_thread_t tid, StackMemoryMap &stack_mmap { // Make sure we never recurse more than 256 times so we don't recurse too far or // store up too much memory in the expedited cache - if (++frame_count > 256) + if (++frame_count > backtrace_limit) break; const nub_size_t read_size = reg_value.info.size*2; @@ -2791,7 +2791,7 @@ RNBRemote::SendStopReplyPacketForThread (nub_thread_t tid) // Add expedited stack memory so stack backtracing doesn't need to read anything from the // frame pointer chain. StackMemoryMap stack_mmap; - ReadStackMemory (pid, tid, stack_mmap); + ReadStackMemory (pid, tid, stack_mmap, 1); if (!stack_mmap.empty()) { for (const auto &stack_memory : stack_mmap) |