@@ -3094,7 +3094,6 @@ bool Target::RunStopHooks() {
3094
3094
3095
3095
bool print_hook_header = (m_stop_hooks.size () != 1 );
3096
3096
bool print_thread_header = (num_exe_ctx != 1 );
3097
- bool auto_continue = false ;
3098
3097
bool should_stop = false ;
3099
3098
bool requested_continue = false ;
3100
3099
@@ -3108,10 +3107,6 @@ bool Target::RunStopHooks() {
3108
3107
if (!cur_hook_sp->ExecutionContextPasses (exc_ctx))
3109
3108
continue ;
3110
3109
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
-
3115
3110
if (print_hook_header && !any_thread_matched) {
3116
3111
StreamString s;
3117
3112
cur_hook_sp->GetDescription (s, eDescriptionLevelBrief);
@@ -3130,7 +3125,10 @@ bool Target::RunStopHooks() {
3130
3125
auto result = cur_hook_sp->HandleStop (exc_ctx, output_sp);
3131
3126
switch (result) {
3132
3127
case StopHook::StopHookResult::KeepStopped:
3133
- should_stop = true ;
3128
+ if (cur_hook_sp->GetAutoContinue ())
3129
+ requested_continue = true ;
3130
+ else
3131
+ should_stop = true ;
3134
3132
break ;
3135
3133
case StopHook::StopHookResult::RequestContinue:
3136
3134
requested_continue = true ;
@@ -3155,10 +3153,9 @@ bool Target::RunStopHooks() {
3155
3153
}
3156
3154
}
3157
3155
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) {
3162
3159
Log *log = GetLog (LLDBLog::Process);
3163
3160
Status error = m_process_sp->PrivateResume ();
3164
3161
if (error.Success ()) {
0 commit comments