summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-08-07 10:26:45 -0600
committerTom Tromey <tromey@adacore.com>2020-08-07 10:26:46 -0600
commitd5d833afcf70888c5186f5117540cfe49a928c4a (patch)
tree77911a89d394ab4164b0dac3e606542f951a2cf6 /gdb
parenta8ac85bb7d6b505323824ed0b354292358db4508 (diff)
downloadbinutils-gdb-d5d833afcf70888c5186f5117540cfe49a928c4a.tar.gz
Change names given to Ravenscar threads
Current a Ravenscar thread is given the same sort of name as a "CPU" thread; they can only be distinguished by looking at the output of "info thread". This patch changes ravenscar-thread.c to distinguish these threads, like: (gdb) continue Continuing. [New Ravenscar Thread 0x2b910] gdb/ChangeLog 2020-08-07 Tom Tromey <tromey@adacore.com> * ravenscar-thread.c (ravenscar_thread_target) <extra_thread_info>: Remove. (ravenscar_thread_target::extra_thread_info): Remove. (ravenscar_thread_target::pid_to_str): Mention Ravenscar in result; defer to target beneath for non-Ravenscar threads.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/ravenscar-thread.c13
2 files changed, 12 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0f4a1fdc409..7bee9c9cbbd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2020-08-07 Tom Tromey <tromey@adacore.com>
+ * ravenscar-thread.c (ravenscar_thread_target) <extra_thread_info>:
+ Remove.
+ (ravenscar_thread_target::extra_thread_info): Remove.
+ (ravenscar_thread_target::pid_to_str): Mention Ravenscar in result;
+ defer to target beneath for non-Ravenscar threads.
+
+2020-08-07 Tom Tromey <tromey@adacore.com>
+
* ravenscar-thread.c (ravenscar_thread_target) <get_base_cpu,
get_base_thread_from_ravenscar_task>: Now methods.
<m_cpu_map>: New member.
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index ee95a1c4bb8..dbcd4de81f8 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -109,8 +109,6 @@ struct ravenscar_thread_target final : public target_ops
void update_thread_list () override;
- const char *extra_thread_info (struct thread_info *) override;
-
std::string pid_to_str (ptid_t) override;
ptid_t get_ada_task_ptid (long lwp, long thread) override;
@@ -414,12 +412,6 @@ ravenscar_thread_target::active_task (int cpu)
return ptid_t (m_base_ptid.pid (), 0, tid);
}
-const char *
-ravenscar_thread_target::extra_thread_info (thread_info *tp)
-{
- return "Ravenscar task";
-}
-
bool
ravenscar_thread_target::thread_alive (ptid_t ptid)
{
@@ -430,7 +422,10 @@ ravenscar_thread_target::thread_alive (ptid_t ptid)
std::string
ravenscar_thread_target::pid_to_str (ptid_t ptid)
{
- return string_printf ("Thread %#x", (int) ptid.tid ());
+ if (!is_ravenscar_task (ptid))
+ return beneath ()->pid_to_str (ptid);
+
+ return string_printf ("Ravenscar Thread %#x", (int) ptid.tid ());
}
void