From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 62C933858D33; Tue, 10 Jan 2023 23:36:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62C933858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673393815; bh=47zQ0FXWsqbtfarjZzKZwhALalldntCV6tAWbVI3DTc=; h=From:To:Subject:Date:From; b=K4u4iQbk7Gv+rlVCr42uaDVzhBqul6FyEaoSAG3MBpdnrhoXF+xOQnUuBoCLPNmkG 95uQ8G0QpqpyOkUXfhkYdr6Cdhjtiteny4mJeCQRphG60MXELrdKMaZWw199HnmKZs fAMAlNu+if1vBiLAV0wwDeHEfkXYC1IwSo3xgdT4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix bug in 'say_where' transform X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 7697bc652347ec5009c2225d0abd3aff41477917 X-Git-Newrev: 066620dcfb9e3e4e68e2c20f60926cb2b016798c Message-Id: <20230110233655.62C933858D33@sourceware.org> Date: Tue, 10 Jan 2023 23:36:55 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D066620dcfb9e= 3e4e68e2c20f60926cb2b016798c commit 066620dcfb9e3e4e68e2c20f60926cb2b016798c Author: Tom Tromey Date: Tue Jan 10 16:35:08 2023 -0700 Fix bug in 'say_where' transform =20 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 =20 if (loc->next) { - struct bp_location *loc =3D loc; + struct bp_location *iter =3D loc; int n =3D 0; - for (; loc; loc =3D loc->next) + for (; iter; iter =3D iter->next) ++n; gdb_printf (" (%d locations)", n); }