[Lldb-commits] [lldb] r118243 - /lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
Jason Molenda
jmolenda at apple.com
Thu Nov 4 02:51:29 PDT 2010
Author: jmolenda
Date: Thu Nov 4 04:51:29 2010
New Revision: 118243
URL: http://llvm.org/viewvc/llvm-project?rev=118243&view=rev
Log:
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.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=118243&r1=118242&r2=118243&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Thu Nov 4 04:51:29 2010
@@ -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 @@
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 @@
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
{
More information about the lldb-commits
mailing list