]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/cli: add a 'normal_stop' option to 'cli_suppress_notification'
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 7 Feb 2022 07:26:56 +0000 (08:26 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 7 Feb 2022 07:26:56 +0000 (08:26 +0100)
Extend the 'cli_suppress_notification' struct with a new field,
'normal_stop', that can be used for checking if printing normal stop
events on the CLI should be suppressed.

This patch only introduces the flag.  The subsequent patch adds a user
command to turn the flag off/on.

gdb/cli/cli-interp.c
gdb/command.h
gdb/tui/tui-interp.c

index eb1edcc4ef1544763fa68b9fa5820ac36f645057..dd56e12e696210028d29c091897fbb290fe926bd 100644 (file)
@@ -127,6 +127,10 @@ cli_on_normal_stop (struct bpstat *bs, int print_frame)
   if (!print_frame)
     return;
 
+  /* This event is suppressed.  */
+  if (cli_suppress_notification.normal_stop)
+    return;
+
   SWITCH_THRU_ALL_UIS ()
     {
       struct interp *interp = top_level_interpreter ();
index 258ec380a448c71fac87b97f3998099f87e877c8..cd798146ae0b77bb382a00c50ecfa1661615092b 100644 (file)
@@ -379,6 +379,9 @@ struct cli_suppress_notification
 {
   /* Inferior, thread, frame selected notification suppressed?  */
   bool user_selected_context = false;
+
+  /* Normal stop event suppressed? */
+  bool normal_stop = false;
 };
 
 extern struct cli_suppress_notification cli_suppress_notification;
index 9b92194dac341780c70fb260b3115abfab9ed811..e867441afb0bb17b524cf4815f81dee8cb224e4e 100644 (file)
@@ -84,6 +84,10 @@ tui_on_normal_stop (struct bpstat *bs, int print_frame)
   if (!print_frame)
     return;
 
+  /* This event is suppressed.  */
+  if (cli_suppress_notification.normal_stop)
+    return;
+
   SWITCH_THRU_ALL_UIS ()
     {
       struct interp *interp = top_level_interpreter ();