public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Simon Marchi <simark@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: constify target_stack::is_pushed Date: Thu, 29 Sep 2022 20:42:01 +0000 (GMT) [thread overview] Message-ID: <20220929204201.893013858C20@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=31282a849107d95d3cfe115ba160f976dd99844c commit 31282a849107d95d3cfe115ba160f976dd99844c Author: Simon Marchi <simon.marchi@polymtl.ca> Date: Thu Sep 29 16:39:13 2022 -0400 gdb: constify target_stack::is_pushed The target_ops parameters here can be made const. Change-Id: Ibc18b17d6b21d06145251a03e68aca90538117d6 Diff: --- gdb/inferior.h | 2 +- gdb/target.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/inferior.h b/gdb/inferior.h index 017800165b4..bb3aec1e8f8 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -369,7 +369,7 @@ public: int unpush_target (struct target_ops *t); /* Returns true if T is pushed in this inferior's target stack. */ - bool target_is_pushed (target_ops *t) + bool target_is_pushed (const target_ops *t) { return m_target_stack.is_pushed (t); } /* Find the target beneath T in this inferior's target stack. */ diff --git a/gdb/target.h b/gdb/target.h index 0b784278c4f..8e13ada07b6 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1385,7 +1385,7 @@ public: bool unpush (target_ops *t); /* Returns true if T is pushed on the target stack. */ - bool is_pushed (target_ops *t) const + bool is_pushed (const target_ops *t) const { return at (t->stratum ()) == t; } /* Return the target at STRATUM. */
reply other threads:[~2022-09-29 20:42 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220929204201.893013858C20@sourceware.org \ --to=simark@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).