From: Tom Tromey Date: Tue, 10 Jan 2023 23:35:08 +0000 (-0700) Subject: Fix bug in 'say_where' transform X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=066620dcfb9e3e4e68e2c20f60926cb2b016798c;p=binutils-gdb.git Fix bug in 'say_where' transform The patch to change say_where into a method introduced a bug. This patch fixes it. --- 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); }