This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA 6/8] Rename ravenscar_thread_target::cpu_map
- From: Tom Tromey <tromey at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at adacore dot com>
- Date: Tue, 26 Mar 2019 08:44:02 -0600
- Subject: [RFA 6/8] Rename ravenscar_thread_target::cpu_map
- References: <20190326144404.6670-1-tromey@adacore.com>
Rename ravenscar_thread_target::cpu_map to m_cpu_map.
This conforms more closely to the gdb style.
gdb/ChangeLog
2019-03-26 Tom Tromey <tromey@adacore.com>
* ravenscar-thread.c (ravenscar_thread_target::m_cpu_map):
Rename from cpu_map.
(ravenscar_thread_target::get_thread_base_cpu)
(ravenscar_thread_target::update_inferior_ptid)
(ravenscar_thread_target::add_thread): Update.
---
gdb/ChangeLog | 8 ++++++++
gdb/ravenscar-thread.c | 10 +++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index 85a86f5698e..f36ee3ea240 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -154,7 +154,7 @@ private:
needed because sometimes the runtime will report an active task
that hasn't yet been put on the list of tasks that is read by
ada-tasks.c. */
- std::unordered_map<long, int> cpu_map;
+ std::unordered_map<long, int> m_cpu_map;
};
/* Return true iff PTID corresponds to a ravenscar task. */
@@ -187,9 +187,9 @@ ravenscar_thread_target::get_thread_base_cpu (ptid_t ptid)
{
/* Prefer to not read inferior memory if possible, to avoid
reentrancy problems with xfer_partial. */
- auto iter = cpu_map.find (ptid.tid ());
+ auto iter = m_cpu_map.find (ptid.tid ());
- if (iter != cpu_map.end ())
+ if (iter != m_cpu_map.end ())
base_cpu = iter->second;
else
{
@@ -273,7 +273,7 @@ ravenscar_thread_target::update_inferior_ptid ()
if (!find_thread_ptid (inferior_ptid))
{
::add_thread (inferior_ptid);
- cpu_map[inferior_ptid.tid ()] = base_cpu;
+ m_cpu_map[inferior_ptid.tid ()] = base_cpu;
}
}
@@ -404,7 +404,7 @@ ravenscar_thread_target::add_thread (struct ada_task_info *task)
if (find_thread_ptid (task->ptid) == NULL)
{
::add_thread (task->ptid);
- cpu_map[task->ptid.tid ()] = task->base_cpu;
+ m_cpu_map[task->ptid.tid ()] = task->base_cpu;
}
}
--
2.20.1