diff options
author | Jason Molenda <jmolenda@apple.com> | 2010-11-04 09:51:29 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2010-11-04 09:51:29 +0000 |
commit | c311c23402ae4073a127321dc6ef984936684ed4 (patch) | |
tree | 8f1890fbb55db6b15e66b414ba02366f915611ac /lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | |
parent | 311eb2deec62985c38fa725af189b52de4910139 (diff) | |
download | bcm5719-llvm-c311c23402ae4073a127321dc6ef984936684ed4.tar.gz bcm5719-llvm-c311c23402ae4073a127321dc6ef984936684ed4.zip |
Add #ifdef to easily switch between the current libunwind-remote based unwinder
or the native unwinder (UnwindLLDB). I'll make the native unwinder the default
once I check in with everyone tomorrow.
llvm-svn: 118243
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index d6667340e3e..478684d5bcc 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -26,6 +26,7 @@ #include "Utility/StringExtractorGDBRemote.h" #include "UnwindLibUnwind.h" #include "UnwindMacOSXFrameBackchain.h" +#include "UnwindLLDB.h" using namespace lldb; using namespace lldb_private; @@ -120,6 +121,10 @@ ThreadGDBRemote::RefreshStateAfterStop() GetRegisterContext()->Invalidate(); } +// Whether to use the new native unwinder (UnwindLLDB) or the libunwind-remote based unwinder for +// stack walks on i386/x86_64 +#undef USE_NATIVE_UNWINDER + Unwind * ThreadGDBRemote::GetUnwinder () { @@ -128,7 +133,11 @@ ThreadGDBRemote::GetUnwinder () const ArchSpec target_arch (GetProcess().GetTarget().GetArchitecture ()); if (target_arch == ArchSpec("x86_64") || target_arch == ArchSpec("i386")) { +#if defined (USE_NATIVE_UNWINDER) + m_unwinder_ap.reset (new UnwindLLDB (*this)); +#else m_unwinder_ap.reset (new UnwindLibUnwind (*this, GetGDBProcess().GetLibUnwindAddressSpace())); +#endif } else { |