summaryrefslogtreecommitdiff
path: root/lldb/source/Target/Target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Target.cpp')
-rw-r--r--lldb/source/Target/Target.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 09c0c0b8a5db..42b1561fb299 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -3094,7 +3094,6 @@ bool Target::RunStopHooks() {
bool print_hook_header = (m_stop_hooks.size() != 1);
bool print_thread_header = (num_exe_ctx != 1);
- bool auto_continue = false;
bool should_stop = false;
bool requested_continue = false;
@@ -3108,10 +3107,6 @@ bool Target::RunStopHooks() {
if (!cur_hook_sp->ExecutionContextPasses(exc_ctx))
continue;
- // We only consult the auto-continue for a stop hook if it matched the
- // specifier.
- auto_continue |= cur_hook_sp->GetAutoContinue();
-
if (print_hook_header && !any_thread_matched) {
StreamString s;
cur_hook_sp->GetDescription(s, eDescriptionLevelBrief);
@@ -3130,7 +3125,10 @@ bool Target::RunStopHooks() {
auto result = cur_hook_sp->HandleStop(exc_ctx, output_sp);
switch (result) {
case StopHook::StopHookResult::KeepStopped:
- should_stop = true;
+ if (cur_hook_sp->GetAutoContinue())
+ requested_continue = true;
+ else
+ should_stop = true;
break;
case StopHook::StopHookResult::RequestContinue:
requested_continue = true;
@@ -3155,10 +3153,9 @@ bool Target::RunStopHooks() {
}
}
- // Resume iff:
- // 1) At least one hook requested to continue and no hook asked to stop, or
- // 2) at least one hook had auto continue on.
- if ((requested_continue && !should_stop) || auto_continue) {
+ // Resume iff at least one hook requested to continue and no hook asked to
+ // stop.
+ if (requested_continue && !should_stop) {
Log *log = GetLog(LLDBLog::Process);
Status error = m_process_sp->PrivateResume();
if (error.Success()) {