diff options
author | Jim Ingham <jingham@apple.com> | 2014-11-22 01:42:44 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2014-11-22 01:42:44 +0000 |
commit | 893c932acf365b99298de2ac6017454af961fb84 (patch) | |
tree | a32cbc3f70e1e1c93f21c6b639bf2e419d002da0 /lldb/source/Commands/CommandObjectBreakpoint.cpp | |
parent | 0f17c5570d2541a90cb963e740cd20b19adcbc67 (diff) | |
download | llvm-893c932acf365b99298de2ac6017454af961fb84.zip llvm-893c932acf365b99298de2ac6017454af961fb84.tar.gz llvm-893c932acf365b99298de2ac6017454af961fb84.tar.bz2 |
This is the first step of making lldb able to create target-specific things
(e.g. breakpoints, stop-hooks) before we have any targets - for instance in
your ~/.lldbinit file. These will then get copied over to any new targets
that get created. So far, you can only make stop-hooks.
Breakpoints will have to learn to move themselves from target to target for
us to get them from no-target to new-target.
We should also make a command & SB API way to prime this ur-target.
llvm-svn: 222600
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 13bf127..fb8a181 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -367,8 +367,8 @@ protected: DoExecute (Args& command, CommandReturnObject &result) { - Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); - if (target == NULL) + Target *target = GetSelectedOrDummyTarget(); + if (target == nullptr) { result.AppendError ("Invalid target. Must set target before setting breakpoints (see 'target create' command)."); result.SetStatus (eReturnStatusFailed); @@ -925,7 +925,7 @@ protected: virtual bool DoExecute (Args& command, CommandReturnObject &result) { - Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); + Target *target = GetSelectedOrDummyTarget(); if (target == NULL) { result.AppendError ("Invalid target. No existing target or breakpoints."); @@ -1055,7 +1055,7 @@ protected: virtual bool DoExecute (Args& command, CommandReturnObject &result) { - Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); + Target *target = GetSelectedOrDummyTarget(); if (target == NULL) { result.AppendError ("Invalid target. No existing target or breakpoints."); @@ -1175,7 +1175,7 @@ protected: virtual bool DoExecute (Args& command, CommandReturnObject &result) { - Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); + Target *target = GetSelectedOrDummyTarget(); if (target == NULL) { result.AppendError ("Invalid target. No existing target or breakpoints."); @@ -1356,7 +1356,7 @@ protected: virtual bool DoExecute (Args& command, CommandReturnObject &result) { - Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); + Target *target = GetSelectedOrDummyTarget(); if (target == NULL) { result.AppendError ("Invalid target. No current target or breakpoints."); @@ -1540,7 +1540,7 @@ protected: virtual bool DoExecute (Args& command, CommandReturnObject &result) { - Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); + Target *target = GetSelectedOrDummyTarget(); if (target == NULL) { result.AppendError ("Invalid target. No existing target or breakpoints."); @@ -1671,7 +1671,7 @@ protected: virtual bool DoExecute (Args& command, CommandReturnObject &result) { - Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get(); + Target *target = GetSelectedOrDummyTarget(); if (target == NULL) { result.AppendError ("Invalid target. No existing target or breakpoints."); |