@@ -3073,7 +3073,6 @@ bool Target::RunStopHooks() {
3073
3073
3074
3074
bool print_hook_header = (m_stop_hooks.size () != 1 );
3075
3075
bool print_thread_header = (num_exe_ctx != 1 );
3076
- bool auto_continue = false ;
3077
3076
bool should_stop = false ;
3078
3077
bool requested_continue = false ;
3079
3078
@@ -3087,10 +3086,6 @@ bool Target::RunStopHooks() {
3087
3086
if (!cur_hook_sp->ExecutionContextPasses (exc_ctx))
3088
3087
continue ;
3089
3088
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
-
3094
3089
if (print_hook_header && !any_thread_matched) {
3095
3090
StreamString s;
3096
3091
cur_hook_sp->GetDescription (s, eDescriptionLevelBrief);
@@ -3109,7 +3104,10 @@ bool Target::RunStopHooks() {
3109
3104
auto result = cur_hook_sp->HandleStop (exc_ctx, output_sp);
3110
3105
switch (result) {
3111
3106
case StopHook::StopHookResult::KeepStopped:
3112
- should_stop = true ;
3107
+ if (cur_hook_sp->GetAutoContinue ())
3108
+ requested_continue = true ;
3109
+ else
3110
+ should_stop = true ;
3113
3111
break ;
3114
3112
case StopHook::StopHookResult::RequestContinue:
3115
3113
requested_continue = true ;
@@ -3134,10 +3132,9 @@ bool Target::RunStopHooks() {
3134
3132
}
3135
3133
}
3136
3134
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) {
3141
3138
Log *log = GetLog (LLDBLog::Process);
3142
3139
Status error = m_process_sp->PrivateResume ();
3143
3140
if (error.Success ()) {
0 commit comments