From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 427023851C34; Wed, 30 Dec 2020 17:16:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 427023851C34 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/25528] step will stopped at any "asm volatile" statement Date: Wed, 30 Dec 2020 17:16:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 17:16:13 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25528 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |NOTABUG --- Comment #3 from Tom de Vries --- (In reply to Yibiao Yang from comment #0) > $ gdb -q ./a.out > Reading symbols from ./a.out... > (gdb) break small.c:9 > Breakpoint 1 at 0x113f: file small.c, line 9. > (gdb) run > Starting program: /home/yibiao/cv-gcov/a.out=20 >=20 > Breakpoint 1, f (delta=3D-1) at small.c:9 > 9 if (NM[p] =3D=3D 0) > (gdb) step > 10 asm volatile(""); > (gdb) c > Continuing. >=20 > Breakpoint 1, f (delta=3D-1) at small.c:9 > 9 if (NM[p] =3D=3D 0) > (gdb) step > 10 asm volatile(""); > (gdb) q > A debugging session is active. >=20 > Inferior 1 [process 4947] will be killed. >=20 > Quit anyway? (y or n) y >=20 >=20 >=20 > #########################################################################= #### > ## > ### We can find that Line #10 @asm volatile("");@ is executed twice.=20 > ### However, it is obvious that Line #9 "if (NM[p] =3D=3D 0)" is True in = the > second for loop.=20 > #########################################################################= #### > ## I think this is a different variant of the same problem: the target of the = true _and_ false path end up at the same insn, which has two entries in the line table. So either we show the "true" line twice, or the "false" line twice. Confusing, but not a gdb bug. On the gcc side, it could be argued that this is exactly what you asked for= by providing an _empty_ asm stmt. --=20 You are receiving this mail because: You are on the CC list for the bug.=