From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24371 invoked by alias); 14 Jan 2015 13:18:09 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 24264 invoked by uid 55); 14 Jan 2015 13:18:07 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/17525] target-async: breakpoint commands not executed when program run from -x script Date: Wed, 14 Jan 2015 13:18:00 -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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: palves at redhat dot com 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: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00081.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17525 --- Comment #6 from cvs-commit at gcc dot gnu.org --- The gdb-7.8-branch branch has been updated by Pedro Alves : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d2c8f4be20a4213ea64b0ede63c2fcde69c637a1 commit d2c8f4be20a4213ea64b0ede63c2fcde69c637a1 Author: Pedro Alves Date: Wed Jan 14 12:38:47 2015 +0000 PR17525 - breakpoint commands not executed when program run from -x script Executing a gdb script that runs the inferior (from the command line with -x), and has it hit breakpoints with breakpoint commands that themselves run the target, is currently broken on async targets (Linux, remote). While we're executing a command list or a script, we force the interpreter to be sync, which results in some functions nesting an event loop and waiting for the target to stop, instead of returning immediately and having the top level event loop handle the stop. The issue with this bug is simply that bpstat_do_actions misses checking whether the interpreter is sync. When we get here, in the case of executing a script (or, when the interpreter is sync), the program has already advanced to the next breakpoint, through maybe_wait_sync_command_done. We need to process its breakpoints immediately, just like with a sync target. Tested on x86_64 Fedora 20. gdb/ 2015-01-14 Pedro Alves PR gdb/17525 * breakpoint.c: Include "interps.h". (bpstat_do_actions_1): Also check whether the interpreter is async. gdb/testsuite/ 2015-01-14 Pedro Alves Joel Brobecker PR gdb/17525 * gdb.base/bp-cmds-execution-x-script.c: New file. * gdb.base/bp-cmds-execution-x-script.exp: New file. * gdb.base/bp-cmds-execution-x-script.gdb: New file. -- You are receiving this mail because: You are on the CC list for the bug.