diff options
| author | Jim Ingham <jingham@apple.com> | 2017-08-03 18:13:24 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2017-08-03 18:13:24 +0000 |
| commit | f08f5c99262ff9eaa08956334accbb2614b0f7a2 (patch) | |
| tree | 7627308ccb3fc7ce52a6ea0ea45c0d948fcd66af /lldb/source/API/SBBreakpointLocation.cpp | |
| parent | f0cadcd9f385d36dc751cdb32476b32ec43306b5 (diff) | |
| download | bcm5719-llvm-f08f5c99262ff9eaa08956334accbb2614b0f7a2.tar.gz bcm5719-llvm-f08f5c99262ff9eaa08956334accbb2614b0f7a2.zip | |
Add an auto-continue flag to breakpoints & locations.
You can get a breakpoint to auto-continue by adding "continue"
as a command, but that has the disadvantage that if you hit two
breakpoints simultaneously, the continue will force the process
to continue, and maybe even forstalling the commands on the other.
The auto-continue flag means the breakpoints can negotiate about
whether to stop.
Writing tests, I wanted to supply some commands when I made the
breakpoints, so I also added that ability.
llvm-svn: 309969
Diffstat (limited to 'lldb/source/API/SBBreakpointLocation.cpp')
| -rw-r--r-- | lldb/source/API/SBBreakpointLocation.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp index f5e0b91483e..2678e1ea758 100644 --- a/lldb/source/API/SBBreakpointLocation.cpp +++ b/lldb/source/API/SBBreakpointLocation.cpp @@ -149,6 +149,25 @@ const char *SBBreakpointLocation::GetCondition() { return NULL; } +void SBBreakpointLocation::SetAutoContinue(bool auto_continue) { + BreakpointLocationSP loc_sp = GetSP(); + if (loc_sp) { + std::lock_guard<std::recursive_mutex> guard( + loc_sp->GetTarget().GetAPIMutex()); + loc_sp->SetAutoContinue(auto_continue); + } +} + +bool SBBreakpointLocation::GetAutoContinue() { + BreakpointLocationSP loc_sp = GetSP(); + if (loc_sp) { + std::lock_guard<std::recursive_mutex> guard( + loc_sp->GetTarget().GetAPIMutex()); + return loc_sp->IsAutoContinue(); + } + return NULL; +} + void SBBreakpointLocation::SetScriptCallbackFunction( const char *callback_function_name) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); |

