public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Fix build bug in ppc-linux-nat.c
@ 2023-02-14  7:30 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-02-14  7:30 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

The buildbot pointed out that my value refactoring series introduced a
bug in ppc-linux-nat.c:

../../binutils-gdb/gdb/ppc-linux-nat.c: In member function ‘int ppc_linux_nat_target::num_memory_accesses(const std::vector<gdb::ref_ptr<value, value_ref_policy> >&)’:
../../binutils-gdb/gdb/ppc-linux-nat.c:2458:44: error: expected unqualified-id before ‘->’ token
 2458 |       if (VALUE_LVAL (v) == not_lval || v->->deprecated_modifiable () == 0)

I don't know how that happened, but I am checking in this patch which
I think should fix it.  It just removes the second "->".

I can't readily test this, so perhaps there's another bug lurking
after this one.
---
 gdb/ppc-linux-nat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index e4fcce694cf..32c0177228a 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -2455,7 +2455,7 @@ ppc_linux_nat_target::num_memory_accesses (const std::vector<value_ref_ptr>
       struct value *v = iter.get ();
 
       /* Constants and values from the history are fine.  */
-      if (v->lval () == not_lval || v->->deprecated_modifiable () == 0)
+      if (v->lval () == not_lval || v->deprecated_modifiable () == 0)
 	continue;
       else if (v->lval () == lval_memory)
 	{
-- 
2.39.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-14  7:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14  7:30 [pushed] Fix build bug in ppc-linux-nat.c Tom Tromey

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).