[binutils-gdb] gdb: const-ify remote_target::add_current_inferior_and_thread parameter
Simon Marchi
simark@sourceware.org
Mon Jan 18 05:46:32 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e3b2741b162209a497db03ed4d19890326f16816
commit e3b2741b162209a497db03ed4d19890326f16816
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Mon Jan 18 00:46:13 2021 -0500
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
Diff:
---
gdb/ChangeLog | 8 ++++++++
gdb/remote.c | 10 +++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e1bf15666ce..657e707b30f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+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)
diff --git a/gdb/remote.c b/gdb/remote.c
index 1df05e6cc70..49181d38716 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;
More information about the Gdb-cvs
mailing list