From patchwork Tue Mar 26 14:44:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 31988 Received: (qmail 81261 invoked by alias); 26 Mar 2019 14:44:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 81130 invoked by uid 89); 26 Mar 2019 14:44:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Mar 2019 14:44:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 106BA116C77; Tue, 26 Mar 2019 10:44:09 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sPI73s-NqumK; Tue, 26 Mar 2019 10:44:09 -0400 (EDT) Received: from murgatroyd.Home (174-29-37-56.hlrn.qwest.net [174.29.37.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id B0BFF116C5F; Tue, 26 Mar 2019 10:44:08 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 6/8] Rename ravenscar_thread_target::cpu_map Date: Tue, 26 Mar 2019 08:44:02 -0600 Message-Id: <20190326144404.6670-7-tromey@adacore.com> In-Reply-To: <20190326144404.6670-1-tromey@adacore.com> References: <20190326144404.6670-1-tromey@adacore.com> MIME-Version: 1.0 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 * 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 cpu_map; + std::unordered_map 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; } }