New command queue-signal.
authorDoug Evans <xdje42@gmail.com>
Sun, 14 Sep 2014 04:44:00 +0000 (21:44 -0700)
committerDoug Evans <xdje42@gmail.com>
Sun, 14 Sep 2014 04:44:00 +0000 (21:44 -0700)
commit81219e5358e6238d3810136690a0c0b2cd20955e
tree19573767c0e0915e7e0fd670a0e544dcf26dfc3a
parentd4b38d2d057a5b8a35bc052e4f43b02b53c40f89
New command queue-signal.

If I want to change the signalled state of multiple threads
it's a bit cumbersome to do with the "signal" command.
What you really want is a way to set the signal state of the
desired threads and then just do "continue".

This patch adds a new command, queue-signal, to accomplish this.
Basically "signal N" == "queue-signal N" + "continue".
That's not precisely true in that "signal" can be used to inject
any signal, including signals set to "nopass"; whereas "queue-signal"
just queues the signal as if the thread stopped because of it.
"nopass" handling is done when the thread is resumed which
"queue-signal" doesn't do.

One could add extra complexity to allow queue-signal to be used to
deliver "nopass" signals like the "signal" command.  I have no current
need for it so in the interests of incremental complexity, I have
left such support out and just have the code flag an error if one
tries to queue a nopass signal.

gdb/ChangeLog:

* NEWS: Mention new "queue-signal" command.
* infcmd.c (queue_signal_command): New function.
(_initialize_infcmd): Add new queue-signal command.

gdb/doc/ChangeLog:

* gdb.texinfo (Signaling): Document new queue-signal command.

gdb/testsuite/ChangeLog:

* gdb.threads/queue-signal.c: New file.
* gdb.threads/queue-signal.exp: New file.
gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/infcmd.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/queue-signal.c [new file with mode: 0644]
gdb/testsuite/gdb.threads/queue-signal.exp [new file with mode: 0644]
This page took 0.045841 seconds and 4 git commands to generate.