From e576ab2996b5fa4facf2bf7e73cc4679cb17c133 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 15 Feb 2011 00:19:15 +0000 Subject: 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 --- lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index 6acefff..635c00c 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(GetRegisterContext ().get()); assert (gdb_reg_ctx); - gdb_reg_ctx->PrivateSetRegisterValue (reg, response); + return gdb_reg_ctx->PrivateSetRegisterValue (reg, response); } bool -- cgit v1.1