All UnwindPlan objects are now passed around as shared pointers.
ArchDefaultUnwindPlan plug-in interfaces are now cached per architecture
instead of being leaked for every frame.
Split the ArchDefaultUnwindPlan_x86 into ArchDefaultUnwindPlan_x86_64 and
ArchDefaultUnwindPlan_i386 interfaces.
There were sporadic crashes that were due to something leaking or being
destroyed when doing stack crawls. This patch should clear up these issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125541 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
index 6acefff..635c00c 100644
--- a/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
@@ -26,7 +26,7 @@
#include "Plugins/Process/Utility/UnwindLLDB.h"
#include "Utility/StringExtractorGDBRemote.h"
-#ifdef __APPLE__
+#if defined(__APPLE__)
#include "UnwindMacOSXFrameBackchain.h"
#endif
@@ -98,6 +98,7 @@
{
case eStateSuspended:
case eStateStopped:
+ // Don't append anything for threads that should stay stopped.
break;
case eStateRunning:
@@ -145,7 +146,7 @@
{
m_unwinder_ap.reset (new UnwindLLDB (*this));
}
-#ifdef __APPLE__
+#if defined(__APPLE__)
else
{
m_unwinder_ap.reset (new UnwindMacOSXFrameBackchain (*this));
@@ -207,12 +208,12 @@
return reg_ctx_sp;
}
-void
+bool
ThreadGDBRemote::PrivateSetRegisterValue (uint32_t reg, StringExtractor &response)
{
GDBRemoteRegisterContext *gdb_reg_ctx = static_cast<GDBRemoteRegisterContext *>(GetRegisterContext ().get());
assert (gdb_reg_ctx);
- gdb_reg_ctx->PrivateSetRegisterValue (reg, response);
+ return gdb_reg_ctx->PrivateSetRegisterValue (reg, response);
}
bool