aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2021-11-25 15:15:52 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2022-01-27 13:31:20 +0100
commit696c0d5ef2a6edaa2094e808f53acd502a157641 (patch)
tree351b7bfa2d640104e2a5b1db0136fc29814ee388 /gdb/remote.c
parentb674665b51112de22260709a214d4d6ba01c7e57 (diff)
downloadgdb-696c0d5ef2a6edaa2094e808f53acd502a157641.zip
gdb-696c0d5ef2a6edaa2094e808f53acd502a157641.tar.gz
gdb-696c0d5ef2a6edaa2094e808f53acd502a157641.tar.bz2
gdb, gdbserver: update thread identifier in enable_btrace target method
The enable_btrace target method takes a ptid_t to identify the thread on which tracing shall be enabled. Change this to thread_info * to avoid translating back and forth between the two. This will be used in a subsequent patch.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index f19a2f7..9f2c63b 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -658,8 +658,8 @@ public:
bool use_agent (bool use) override;
bool can_use_agent () override;
- struct btrace_target_info *enable_btrace (ptid_t ptid,
- const struct btrace_config *conf) override;
+ struct btrace_target_info *
+ enable_btrace (thread_info *tp, const struct btrace_config *conf) override;
void disable_btrace (struct btrace_target_info *tinfo) override;
@@ -14178,7 +14178,8 @@ remote_target::remote_btrace_maybe_reopen ()
/* Enable branch tracing. */
struct btrace_target_info *
-remote_target::enable_btrace (ptid_t ptid, const struct btrace_config *conf)
+remote_target::enable_btrace (thread_info *tp,
+ const struct btrace_config *conf)
{
struct btrace_target_info *tinfo = NULL;
struct packet_config *packet = NULL;
@@ -14202,6 +14203,7 @@ remote_target::enable_btrace (ptid_t ptid, const struct btrace_config *conf)
btrace_sync_conf (conf);
+ ptid_t ptid = tp->ptid;
set_general_thread (ptid);
buf += xsnprintf (buf, endbuf - buf, "%s", packet->name);