summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-02-15 00:19:15 +0000
committerGreg Clayton <gclayton@apple.com>2011-02-15 00:19:15 +0000
commite576ab2996b5fa4facf2bf7e73cc4679cb17c133 (patch)
treebdcafd5e6a9f09adf5a3e9d3b7e92f9d693b939c /lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
parent91c08ad14a81cc40769442c19a23addfba28371e (diff)
downloadbcm5719-llvm-e576ab2996b5fa4facf2bf7e73cc4679cb17c133.tar.gz
bcm5719-llvm-e576ab2996b5fa4facf2bf7e73cc4679cb17c133.zip
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. llvm-svn: 125541
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
index 6acefff3216..635c00c7438 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
+++ b/lldb/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 @@ ThreadGDBRemote::WillResume (StateType resume_state)
{
case eStateSuspended:
case eStateStopped:
+ // Don't append anything for threads that should stay stopped.
break;
case eStateRunning:
@@ -145,7 +146,7 @@ ThreadGDBRemote::GetUnwinder ()
{
m_unwinder_ap.reset (new UnwindLLDB (*this));
}
-#ifdef __APPLE__
+#if defined(__APPLE__)
else
{
m_unwinder_ap.reset (new UnwindMacOSXFrameBackchain (*this));
@@ -207,12 +208,12 @@ ThreadGDBRemote::CreateRegisterContextForFrame (StackFrame *frame)
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
OpenPOWER on IntegriCloud