aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-12-21 14:15:16 -0700
committerTom Tromey <tromey@adacore.com>2023-01-20 10:48:26 -0700
commit42938c1a5b84207e9b6526e56d8e57e1ad3bab5f (patch)
tree9283f9c7caaa77db215bc665c4f65c98a3e7ba4c /gdb/remote.c
parent5a5319833d7bcac780f4a21cf1e72a4c5c67f575 (diff)
downloadgdb-42938c1a5b84207e9b6526e56d8e57e1ad3bab5f.zip
gdb-42938c1a5b84207e9b6526e56d8e57e1ad3bab5f.tar.gz
gdb-42938c1a5b84207e9b6526e56d8e57e1ad3bab5f.tar.bz2
Constify notif_client
It seems to me that a notif_client is read-only, so this patch changes the code to use "const" everywhere.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 0a6e293..aaac434 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -844,7 +844,7 @@ public: /* Remote specific methods. */
void send_interrupt_sequence ();
void interrupt_query ();
- void remote_notif_get_pending_events (notif_client *nc);
+ void remote_notif_get_pending_events (const notif_client *nc);
int fetch_register_using_p (struct regcache *regcache,
packet_reg *reg);
@@ -4995,7 +4995,7 @@ remote_target::start_remote_1 (int from_tty, int extended_p)
mechanism. */
if (strcmp (rs->buf.data (), "OK") != 0)
{
- struct notif_client *notif = &notif_client_stop;
+ const notif_client *notif = &notif_client_stop;
/* remote_notif_get_pending_replies acks this one, and gets
the rest out. */
@@ -7219,7 +7219,7 @@ remote_target::stop_reply_queue_length ()
static void
remote_notif_stop_parse (remote_target *remote,
- struct notif_client *self, const char *buf,
+ const notif_client *self, const char *buf,
struct notif_event *event)
{
remote->remote_parse_stop_reply (buf, (struct stop_reply *) event);
@@ -7227,7 +7227,7 @@ remote_notif_stop_parse (remote_target *remote,
static void
remote_notif_stop_ack (remote_target *remote,
- struct notif_client *self, const char *buf,
+ const notif_client *self, const char *buf,
struct notif_event *event)
{
struct stop_reply *stop_reply = (struct stop_reply *) event;
@@ -7244,7 +7244,7 @@ remote_notif_stop_ack (remote_target *remote,
static int
remote_notif_stop_can_get_pending_events (remote_target *remote,
- struct notif_client *self)
+ const notif_client *self)
{
/* We can't get pending events in remote_notif_process for
notification stop, and we have to do this in remote_wait_ns
@@ -7270,7 +7270,7 @@ remote_notif_stop_alloc_reply ()
/* A client of notification Stop. */
-struct notif_client notif_client_stop =
+const notif_client notif_client_stop =
{
"Stop",
"vStopped",
@@ -7290,7 +7290,7 @@ struct notif_client notif_client_stop =
void
remote_target::remove_new_fork_children (threads_listing_context *context)
{
- struct notif_client *notif = &notif_client_stop;
+ const notif_client *notif = &notif_client_stop;
/* For any threads stopped at a fork event, remove the corresponding
fork child threads from the CONTEXT list. */
@@ -7326,7 +7326,7 @@ void
remote_target::check_pending_events_prevent_wildcard_vcont
(bool *may_global_wildcard)
{
- struct notif_client *notif = &notif_client_stop;
+ const notif_client *notif = &notif_client_stop;
remote_notif_get_pending_events (notif);
for (auto &event : get_remote_state ()->stop_reply_queue)
@@ -7896,7 +7896,7 @@ Packet: '%s'\n"),
*/
void
-remote_target::remote_notif_get_pending_events (notif_client *nc)
+remote_target::remote_notif_get_pending_events (const notif_client *nc)
{
struct remote_state *rs = get_remote_state ();
@@ -7934,7 +7934,7 @@ remote_target::remote_notif_get_pending_events (notif_client *nc)
avoid having to export the whole remote_target class. */
void
-remote_notif_get_pending_events (remote_target *remote, notif_client *nc)
+remote_notif_get_pending_events (remote_target *remote, const notif_client *nc)
{
remote->remote_notif_get_pending_events (nc);
}
@@ -10058,7 +10058,7 @@ void
remote_target::kill_new_fork_children (inferior *inf)
{
remote_state *rs = get_remote_state ();
- struct notif_client *notif = &notif_client_stop;
+ const notif_client *notif = &notif_client_stop;
/* Kill the fork child threads of any threads in inferior INF that are stopped
at a fork event. */