summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-12-06 01:28:03 +0000
committerJim Ingham <jingham@apple.com>2014-12-06 01:28:03 +0000
commit33df7cd345e926f63c02c29bcaa5826dea84f265 (patch)
tree9da478a4d3225be373ffeac9d30aaaa6ee30519a /lldb/source/Core/Debugger.cpp
parentda41af9e9423eeb435bbf64f94649726569ae45b (diff)
downloadbcm5719-llvm-33df7cd345e926f63c02c29bcaa5826dea84f265.tar.gz
bcm5719-llvm-33df7cd345e926f63c02c29bcaa5826dea84f265.zip
Add the ability to set breakpoints with conditions, commands, etc,
in the "dummy-target". The dummy target breakpoints prime all future targets. Breakpoints set before any target is created (e.g. breakpoints in ~/.lldbinit) automatically get set in the dummy target. You can also list, add & delete breakpoints from the dummy target using the "-D" flag, which is supported by most of the breakpoint commands. This removes a long-standing wart in lldb... <rdar://problem/10881487> llvm-svn: 223565
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 3462fcdaf26..c7342ade6ca 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -3418,12 +3418,16 @@ Debugger::GetDummyTarget()
}
Target *
-Debugger::GetSelectedOrDummyTarget()
+Debugger::GetSelectedOrDummyTarget(bool prefer_dummy)
{
- Target *return_target = m_target_list.GetSelectedTarget().get();
- if (return_target)
- return return_target;
-
+ Target *target = nullptr;
+ if (!prefer_dummy)
+ {
+ target = m_target_list.GetSelectedTarget().get();
+ if (target)
+ return target;
+ }
+
return GetDummyTarget();
}
OpenPOWER on IntegriCloud