public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Fix bug in 'say_where' transform
@ 2023-01-10 23:36 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-01-10 23:36 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

The patch to change say_where into a method introduced a bug.  This
patch fixes it.
---
 gdb/breakpoint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 6762fad5d2c..00cc2ab401c 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -11558,9 +11558,9 @@ code_breakpoint::say_where () const
 
       if (loc->next)
 	{
-	  struct bp_location *loc = loc;
+	  struct bp_location *iter = loc;
 	  int n = 0;
-	  for (; loc; loc = loc->next)
+	  for (; iter; iter = iter->next)
 	    ++n;
 	  gdb_printf (" (%d locations)", n);
 	}
-- 
2.39.0


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

only message in thread, other threads:[~2023-01-10 23:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 23:36 [pushed] Fix bug in 'say_where' transform 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).