This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/17525] target-async: breakpoint commands not executed when program run from -x script


https://sourceware.org/bugzilla/show_bug.cgi?id=17525

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pedro Alves <palves@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5589af0e6661abe07e9a997f6324988b4b87c72f

commit 5589af0e6661abe07e9a997f6324988b4b87c72f
Author: Pedro Alves <palves@redhat.com>
Date:   Mon Jan 12 19:30:08 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  <palves@redhat.com>

        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  <palves@redhat.com>
            Joel Brobecker  <brobecker@adacore.com>

        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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]