diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-18 00:46:13 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-18 00:46:13 -0500 |
commit | e3b2741b162209a497db03ed4d19890326f16816 (patch) | |
tree | ac5b43f6970d26d67aa9ae29d4dca8db73b8456d | |
parent | cecb19129054860e40d14c78af5c5ab06873e0ab (diff) | |
download | gdb-e3b2741b162209a497db03ed4d19890326f16816.zip gdb-e3b2741b162209a497db03ed4d19890326f16816.tar.gz gdb-e3b2741b162209a497db03ed4d19890326f16816.tar.bz2 |
gdb: const-ify remote_target::add_current_inferior_and_thread parameter
... and adjust callers / callees.
gdb/ChangeLog:
* remote.c (class remote_target):
<add_current_inferior_and_thread>: Constify parameter.
(stop_reply_extract_thread): Likewise.
(remote_target::get_current_thread): Likewise.
(remote_target::add_current_inferior_and_thread): Likewise.
Change-Id: Ifdc6c263104b58852b532cfda81caf836437d29c
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/remote.c | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e1bf156..657e707 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2021-01-18 Simon Marchi <simon.marchi@polymtl.ca> + * remote.c (class remote_target): + <add_current_inferior_and_thread>: Constify parameter. + (stop_reply_extract_thread): Likewise. + (remote_target::get_current_thread): Likewise. + (remote_target::add_current_inferior_and_thread): Likewise. + +2021-01-18 Simon Marchi <simon.marchi@polymtl.ca> + * remote.c (class remote_target) <remote_unpack_thread_info_response, parse_threadlist_response>: Constify parameter and/or return diff --git a/gdb/remote.c b/gdb/remote.c index 1df05e6..49181d3 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -737,7 +737,7 @@ public: /* Remote specific methods. */ int remote_resume_with_vcont (ptid_t ptid, int step, gdb_signal siggnal); - void add_current_inferior_and_thread (char *wait_status); + void add_current_inferior_and_thread (const char *wait_status); ptid_t wait_ns (ptid_t ptid, struct target_waitstatus *status, target_wait_flags options); @@ -784,7 +784,7 @@ public: /* Remote specific methods. */ int try_open_exec); ptid_t remote_current_thread (ptid_t oldpid); - ptid_t get_current_thread (char *wait_status); + ptid_t get_current_thread (const char *wait_status); void set_thread (ptid_t ptid, int gen); void set_general_thread (ptid_t ptid); @@ -4351,7 +4351,7 @@ remote_target::send_interrupt_sequence () and extract the PTID. Returns NULL_PTID if not found. */ static ptid_t -stop_reply_extract_thread (char *stop_reply) +stop_reply_extract_thread (const char *stop_reply) { if (stop_reply[0] == 'T' && strlen (stop_reply) > 3) { @@ -4391,7 +4391,7 @@ stop_reply_extract_thread (char *stop_reply) method avoids a roundtrip. */ ptid_t -remote_target::get_current_thread (char *wait_status) +remote_target::get_current_thread (const char *wait_status) { ptid_t ptid = null_ptid; @@ -4418,7 +4418,7 @@ remote_target::get_current_thread (char *wait_status) in in WAIT_STATUS, which may be NULL. */ void -remote_target::add_current_inferior_and_thread (char *wait_status) +remote_target::add_current_inferior_and_thread (const char *wait_status) { struct remote_state *rs = get_remote_state (); bool fake_pid_p = false; |