@@ -3073,7 +3073,6 @@ bool Target::RunStopHooks() {
30733073
30743074 bool print_hook_header = (m_stop_hooks.size () != 1 );
30753075 bool print_thread_header = (num_exe_ctx != 1 );
3076- bool auto_continue = false ;
30773076 bool should_stop = false ;
30783077 bool requested_continue = false ;
30793078
@@ -3087,10 +3086,6 @@ bool Target::RunStopHooks() {
30873086 if (!cur_hook_sp->ExecutionContextPasses (exc_ctx))
30883087 continue ;
30893088
3090- // We only consult the auto-continue for a stop hook if it matched the
3091- // specifier.
3092- auto_continue |= cur_hook_sp->GetAutoContinue ();
3093-
30943089 if (print_hook_header && !any_thread_matched) {
30953090 StreamString s;
30963091 cur_hook_sp->GetDescription (s, eDescriptionLevelBrief);
@@ -3109,7 +3104,10 @@ bool Target::RunStopHooks() {
31093104 auto result = cur_hook_sp->HandleStop (exc_ctx, output_sp);
31103105 switch (result) {
31113106 case StopHook::StopHookResult::KeepStopped:
3112- should_stop = true ;
3107+ if (cur_hook_sp->GetAutoContinue ())
3108+ requested_continue = true ;
3109+ else
3110+ should_stop = true ;
31133111 break ;
31143112 case StopHook::StopHookResult::RequestContinue:
31153113 requested_continue = true ;
@@ -3134,10 +3132,9 @@ bool Target::RunStopHooks() {
31343132 }
31353133 }
31363134
3137- // Resume iff:
3138- // 1) At least one hook requested to continue and no hook asked to stop, or
3139- // 2) at least one hook had auto continue on.
3140- if ((requested_continue && !should_stop) || auto_continue) {
3135+ // Resume iff at least one hook requested to continue and no hook asked to
3136+ // stop.
3137+ if (requested_continue && !should_stop) {
31413138 Log *log = GetLog (LLDBLog::Process);
31423139 Status error = m_process_sp->PrivateResume ();
31433140 if (error.Success ()) {
0 commit comments