From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 569EF386197D; Tue, 22 Sep 2020 18:08:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 569EF386197D From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/26652] Unexpected prompt when using "continue" breakpoint commands and mix of -x and -ex Date: Tue, 22 Sep 2020 18:08:23 +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: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Tue, 22 Sep 2020 18:08:23 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26652 --- Comment #1 from Simon Marchi --- Oops, I hit submit too soon, here's the rest. I have this GDB script: b bar commands print n continue end I run GDB like this: $ ./gdb -nx --data-directory=3Ddata-directory ./test -x script -ex r I would expect the breakpoint on bar to be hit twice, then the program to e= xit. What I see is: $ ./gdb -q -nx --data-directory=3Ddata-directory ./test -x script -ex r Reading symbols from ./test... Breakpoint 1 at 0x4004dd: file test.c, line 3. Starting program: /home/smarchi/build/binutils-gdb/gdb/test=20 Breakpoint 1, bar (n=3D0) at test.c:3 3 } (gdb)=20 And the execution appears to stop here. However, if I then type any command (like print 1), execution appears to resume until the program exits: (gdb) print 1 $1 =3D 1 $2 =3D 0 Breakpoint 1, bar (n=3D1) at test.c:3 3 } $3 =3D 1 [Inferior 1 (process 29906) exited normally] (gdb)=20 So, it looks like some event gets stuck somewhere and doesn't get pulled by infrun until the event loop is woken up by the command handler. --=20 You are receiving this mail because: You are on the CC list for the bug.=