public inbox for
 help / color / mirror / Atom feed
From: Tom Tromey <>
Cc: Tom Tromey <>
Subject: [pushed] Fix bug in 'say_where' transform
Date: Tue, 10 Jan 2023 16:36:01 -0700	[thread overview]
Message-ID: <> (raw)

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)
 	  gdb_printf (" (%d locations)", n);

                 reply	other threads:[~2023-01-10 23:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).