gdb/cli: add a 'normal_stop' option to 'cli_suppress_notification'

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.
This commit is contained in:
Tankut Baris Aktemur
2022-02-07 08:26:56 +01:00
parent f36c891801
commit 2b826f7592
3 changed files with 11 additions and 0 deletions

View 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 ();

View 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;

View 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 ();