public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH] gdb: remove end_stepping_range observable
Date: Mon, 24 Apr 2023 11:10:07 -0400	[thread overview]
Message-ID: <20230424151007.54516-1-simon.marchi@efficios.com> (raw)

I noticed that this observable was never notified, which means we can
probably safely remove it.

Change-Id: If5da5149276c282d2540097c8c4327ce0f70431a
---
 gdb/cli/cli-interp.c | 17 -----------------
 gdb/mi/mi-interp.c   | 20 --------------------
 gdb/observable.c     |  1 -
 gdb/observable.h     |  3 ---
 4 files changed, 41 deletions(-)

diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 99410147a6ce..5a515c603c6e 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -151,21 +151,6 @@ cli_base_on_signal_received (enum gdb_signal siggnal)
     }
 }
 
-/* Observer for the end_stepping_range notification.  */
-
-static void
-cli_base_on_end_stepping_range ()
-{
-  SWITCH_THRU_ALL_UIS ()
-    {
-      cli_interp_base *cli = as_cli_interp_base (top_level_interpreter ());
-      if (cli == nullptr)
-	continue;
-
-      print_end_stepping_range_reason (cli->interp_ui_out ());
-    }
-}
-
 /* Observer for the signalled notification.  */
 
 static void
@@ -422,8 +407,6 @@ _initialize_cli_interp ()
   /* Note these all work for both the CLI and TUI interpreters.  */
   gdb::observers::normal_stop.attach (cli_base_on_normal_stop,
 				      "cli-interp-base");
-  gdb::observers::end_stepping_range.attach (cli_base_on_end_stepping_range,
-					     "cli-interp-base");
   gdb::observers::signal_received.attach (cli_base_on_signal_received,
 					  "cli-interp-base");
   gdb::observers::signal_exited.attach (cli_base_on_signal_exited,
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 4f0bbd40f9d7..ce78b0c2b58a 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -61,7 +61,6 @@ static void mi_insert_notify_hooks (void);
 static void mi_remove_notify_hooks (void);
 
 static void mi_on_signal_received (enum gdb_signal siggnal);
-static void mi_on_end_stepping_range (void);
 static void mi_on_signal_exited (enum gdb_signal siggnal);
 static void mi_on_exited (int exitstatus);
 static void mi_on_normal_stop (struct bpstat *bs, int print_frame);
@@ -542,23 +541,6 @@ mi_on_signal_received (enum gdb_signal siggnal)
     }
 }
 
-/* Observer for the end_stepping_range notification.  */
-
-static void
-mi_on_end_stepping_range (void)
-{
-  SWITCH_THRU_ALL_UIS ()
-    {
-      struct mi_interp *mi = find_mi_interp ();
-
-      if (mi == NULL)
-	continue;
-
-      print_end_stepping_range_reason (mi->mi_uiout);
-      print_end_stepping_range_reason (mi->cli_uiout);
-    }
-}
-
 /* Observer for the signal_exited notification.  */
 
 static void
@@ -1317,8 +1299,6 @@ _initialize_mi_interp ()
   interp_factory_register (INTERP_MI, mi_interp_factory);
 
   gdb::observers::signal_received.attach (mi_on_signal_received, "mi-interp");
-  gdb::observers::end_stepping_range.attach (mi_on_end_stepping_range,
-					     "mi-interp");
   gdb::observers::signal_exited.attach (mi_on_signal_exited, "mi-interp");
   gdb::observers::exited.attach (mi_on_exited, "mi-interp");
   gdb::observers::no_history.attach (mi_on_no_history, "mi-interp");
diff --git a/gdb/observable.c b/gdb/observable.c
index 49de89c25e04..82563e3fab47 100644
--- a/gdb/observable.c
+++ b/gdb/observable.c
@@ -34,7 +34,6 @@ bool observer_debug = false;
 
 DEFINE_OBSERVABLE (normal_stop);
 DEFINE_OBSERVABLE (signal_received);
-DEFINE_OBSERVABLE (end_stepping_range);
 DEFINE_OBSERVABLE (signal_exited);
 DEFINE_OBSERVABLE (exited);
 DEFINE_OBSERVABLE (no_history);
diff --git a/gdb/observable.h b/gdb/observable.h
index 3066cf68f314..e4e6f021f1a9 100644
--- a/gdb/observable.h
+++ b/gdb/observable.h
@@ -57,9 +57,6 @@ extern observable<struct bpstat */* bs */, int /* print_frame */> normal_stop;
 /* The inferior was stopped by a signal.  */
 extern observable<enum gdb_signal /* siggnal */> signal_received;
 
-/* We are done with a step/next/si/ni command.  */
-extern observable<> end_stepping_range;
-
 /* The inferior was terminated by a signal.  */
 extern observable<enum gdb_signal /* siggnal */> signal_exited;
 
-- 
2.40.0


             reply	other threads:[~2023-04-24 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24 15:10 Simon Marchi [this message]
2023-04-24 17:00 ` Tom Tromey
2023-04-24 19:55   ` Simon Marchi
2023-04-25 12:16     ` Aktemur, Tankut Baris
2023-04-27 13:36       ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230424151007.54516-1-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).