diff options
author | Jason Molenda <jmolenda@apple.com> | 2010-10-26 00:47:17 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2010-10-26 00:47:17 +0000 |
commit | 5c01cb6b7750c467e19aea48331a8f588792f29d (patch) | |
tree | bce6f615fd80ec2effbaa5e566c9a7efd7e952d7 /lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp | |
parent | be3a1b14dc45898aca1b9a85a86849614e82aa87 (diff) | |
download | bcm5719-llvm-5c01cb6b7750c467e19aea48331a8f588792f29d.tar.gz bcm5719-llvm-5c01cb6b7750c467e19aea48331a8f588792f29d.zip |
Get a disassembler based on the correct architecture for assembly
prologue profiling.
Change the log print statements to elide the thread number, make
some of them only print when IsLogVerbose().
Add a couple of sanity checks for impossible CFA values so backtraces
don't go too far off into the weeds.
llvm-svn: 117343
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp index 6d4c345e28e..e2d2f9c8f67 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -71,8 +71,8 @@ UnwindLLDB::GetFrameCount() delete register_ctx; if (log) { - log->Printf("%*sThread %u Frame %d invalid RegisterContext for this frame, stopping stack walk", - cur_idx, "", m_thread.GetIndexID(), cur_idx); + log->Printf("%*sFrame %d invalid RegisterContext for this frame, stopping stack walk", + cur_idx, "", cur_idx); } break; } @@ -81,8 +81,18 @@ UnwindLLDB::GetFrameCount() delete register_ctx; if (log) { - log->Printf("%*sThread %u Frame %d did not get CFA for this frame, stopping stack walk", - cur_idx, "", m_thread.GetIndexID(), cur_idx); + log->Printf("%*sFrame %d did not get CFA for this frame, stopping stack walk", + cur_idx, "", cur_idx); + } + break; + } + if (cursor.cfa == (addr_t) -1 || cursor.cfa == 1 || cursor.cfa == 0) + { + delete register_ctx; + if (log) + { + log->Printf("%*sFrame %d did not get a valid CFA for this frame, stopping stack walk", + cur_idx, "", cur_idx); } break; } @@ -91,8 +101,8 @@ UnwindLLDB::GetFrameCount() delete register_ctx; if (log) { - log->Printf("%*sThread %u Frame %d did not get PC for this frame, stopping stack walk", - cur_idx, "", m_thread.GetIndexID(), cur_idx); + log->Printf("%*sFrame %d did not get PC for this frame, stopping stack walk", + cur_idx, "", cur_idx); } break; } |