@@ -3094,7 +3094,6 @@ bool Target::RunStopHooks() {
30943094
30953095 bool print_hook_header = (m_stop_hooks.size () != 1 );
30963096 bool print_thread_header = (num_exe_ctx != 1 );
3097- bool auto_continue = false ;
30983097 bool should_stop = false ;
30993098 bool requested_continue = false ;
31003099
@@ -3108,10 +3107,6 @@ bool Target::RunStopHooks() {
31083107 if (!cur_hook_sp->ExecutionContextPasses (exc_ctx))
31093108 continue ;
31103109
3111- // We only consult the auto-continue for a stop hook if it matched the
3112- // specifier.
3113- auto_continue |= cur_hook_sp->GetAutoContinue ();
3114-
31153110 if (print_hook_header && !any_thread_matched) {
31163111 StreamString s;
31173112 cur_hook_sp->GetDescription (s, eDescriptionLevelBrief);
@@ -3130,7 +3125,10 @@ bool Target::RunStopHooks() {
31303125 auto result = cur_hook_sp->HandleStop (exc_ctx, output_sp);
31313126 switch (result) {
31323127 case StopHook::StopHookResult::KeepStopped:
3133- should_stop = true ;
3128+ if (cur_hook_sp->GetAutoContinue ())
3129+ requested_continue = true ;
3130+ else
3131+ should_stop = true ;
31343132 break ;
31353133 case StopHook::StopHookResult::RequestContinue:
31363134 requested_continue = true ;
@@ -3155,10 +3153,9 @@ bool Target::RunStopHooks() {
31553153 }
31563154 }
31573155
3158- // Resume iff:
3159- // 1) At least one hook requested to continue and no hook asked to stop, or
3160- // 2) at least one hook had auto continue on.
3161- if ((requested_continue && !should_stop) || auto_continue) {
3156+ // Resume iff at least one hook requested to continue and no hook asked to
3157+ // stop.
3158+ if (requested_continue && !should_stop) {
31623159 Log *log = GetLog (LLDBLog::Process);
31633160 Status error = m_process_sp->PrivateResume ();
31643161 if (error.Success ()) {
0 commit comments