public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] 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-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=066620dcfb9e3e4e68e2c20f60926cb2b016798c

commit 066620dcfb9e3e4e68e2c20f60926cb2b016798c
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Jan 10 16:35:08 2023 -0700

    Fix bug in 'say_where' transform
    
    The patch to change say_where into a method introduced a bug.  This
    patch fixes it.

Diff:
---
 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);
 	}

^ 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 [binutils-gdb] 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).