gdb: constify target_stack::is_pushed

The target_ops parameters here can be made const.

Change-Id: Ibc18b17d6b21d06145251a03e68aca90538117d6
This commit is contained in:
Simon Marchi 2022-09-29 16:39:13 -04:00
parent ac9b8c676e
commit 31282a8491
2 changed files with 2 additions and 2 deletions

View File

@ -369,7 +369,7 @@ class inferior : public refcounted_object,
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. */

View File

@ -1385,7 +1385,7 @@ class target_stack
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. */