summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp
diff options
context:
space:
mode:
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>2015-02-03 10:05:54 +0000
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>2015-02-03 10:05:54 +0000
commit0d51c1563b8c37ee34a82e7f7592d7a27ba28822 (patch)
tree88da8fb8d5e4de42d1a180c148515871bd06d53f /lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp
parente03491d39074a28585f7d4b8eebc88ad24d69aab (diff)
downloadbcm5719-llvm-0d51c1563b8c37ee34a82e7f7592d7a27ba28822.tar.gz
bcm5719-llvm-0d51c1563b8c37ee34a82e7f7592d7a27ba28822.zip
Fix CLI commands in lldb-mi.
This patch fixes execution of CLI commands in MI mode. The CLI commands are executed using "-interpreter-exec" command. The bug was in the CMICmnLLDBDebugSessionInfo class which contained the following members: SBProcess, SBTarget, SBDebugger and SBListener, but CLI commands don't affect them and they aren't updated. Therefore some members can contain incorrect (or obsolete) reference and it can cause an error. My patch removes these members and uses getters that provides the updated instance every time it is used. Patch from Ilia K ki.stfu@gmail.com. Approved by Greg. llvm-svn: 227958
Diffstat (limited to 'lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp')
-rw-r--r--lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp b/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp
index dc3ad4b0341..5ac380c00a1 100644
--- a/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp
+++ b/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp
@@ -148,7 +148,8 @@ CMICmnLLDBDebugger::Shutdown(void)
// Explicitly delete the remote target in case MI needs to exit prematurely otherwise
// LLDB debugger may hang in its Destroy() fn waiting on events
- m_lldbDebugger.DeleteTarget(CMICmnLLDBDebugSessionInfo::Instance().m_lldbTarget);
+ lldb::SBTarget sbTarget = CMICmnLLDBDebugSessionInfo::Instance().GetTarget();
+ m_lldbDebugger.DeleteTarget(sbTarget);
// Debug: May need this but does seem to work without it so commented out the fudge 19/06/2014
// It appears we need to wait as hang does not occur when hitting a debug breakpoint here
OpenPOWER on IntegriCloud