aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-10 16:35:08 -0700
committerTom Tromey <tom@tromey.com>2023-01-10 16:36:48 -0700
commit066620dcfb9e3e4e68e2c20f60926cb2b016798c (patch)
treeb1d47baf033b966cb8ec221cb5db1a9c81db794c
parent7697bc652347ec5009c2225d0abd3aff41477917 (diff)
downloadgdb-066620dcfb9e3e4e68e2c20f60926cb2b016798c.zip
gdb-066620dcfb9e3e4e68e2c20f60926cb2b016798c.tar.gz
gdb-066620dcfb9e3e4e68e2c20f60926cb2b016798c.tar.bz2
Fix bug in 'say_where' transform
The patch to change say_where into a method introduced a bug. This patch fixes it.
-rw-r--r--gdb/breakpoint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 6762fad..00cc2ab 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);
}