File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3077,6 +3077,7 @@ class CommandObjectTargetStopHookAdd : public CommandObject
3077
3077
{
3078
3078
File &out_file = reader.GetDebugger ().GetOutputFile ();
3079
3079
Target::StopHook *new_stop_hook = ((Target::StopHook *) baton);
3080
+ static bool got_interrupted;
3080
3081
3081
3082
switch (notification)
3082
3083
{
@@ -3085,6 +3086,7 @@ class CommandObjectTargetStopHookAdd : public CommandObject
3085
3086
if (reader.GetPrompt ())
3086
3087
out_file.Printf (" %s" , reader.GetPrompt ());
3087
3088
out_file.Flush ();
3089
+ got_interrupted = false ;
3088
3090
break ;
3089
3091
3090
3092
case eInputReaderDeactivate:
@@ -3096,6 +3098,7 @@ class CommandObjectTargetStopHookAdd : public CommandObject
3096
3098
out_file.Printf (" %s" , reader.GetPrompt ());
3097
3099
out_file.Flush ();
3098
3100
}
3101
+ got_interrupted = false ;
3099
3102
break ;
3100
3103
3101
3104
case eInputReaderAsynchronousOutputWritten:
@@ -3125,14 +3128,16 @@ class CommandObjectTargetStopHookAdd : public CommandObject
3125
3128
3126
3129
reader.SetIsDone (true );
3127
3130
}
3131
+ got_interrupted = true ;
3128
3132
break ;
3129
3133
3130
3134
case eInputReaderEndOfFile:
3131
3135
reader.SetIsDone (true );
3132
3136
break ;
3133
3137
3134
3138
case eInputReaderDone:
3135
- out_file.Printf (" Stop hook #%d added.\n " , new_stop_hook->GetID ());
3139
+ if (!got_interrupted)
3140
+ out_file.Printf (" Stop hook #%d added.\n " , new_stop_hook->GetID ());
3136
3141
break ;
3137
3142
}
3138
3143
You can’t perform that action at this time.
0 commit comments