This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/17970] cannot call any function or method with "print" or "call" after command "handle SIGSEGV noprint pass"
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 12 Jun 2015 10:18:59 +0000
- Subject: [Bug c++/17970] cannot call any function or method with "print" or "call" after command "handle SIGSEGV noprint pass"
- Auto-submitted: auto-generated
- References: <bug-17970-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17970
Pedro Alves <palves at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com
--- Comment #8 from Pedro Alves <palves at redhat dot com> ---
That's how it's documented, actually.
The manual says (though that can always be improved):
~~~
stop
GDB should stop your program when this signal happens. This implies
print keyword as well.
noprint
GDB should not mention the occurrence of the signal at all. This
implies the nostop keyword as well.
~~~
And you can see that in the "handle" command's output:
(gdb) handle SIGSEGV
Signal Stop Print Pass to program Description
SIGSEGV Yes Yes Yes Segmentation fault
^^^^
(gdb) handle SIGSEGV noprint
Signal Stop Print Pass to program Description
SIGSEGV No No Yes Segmentation fault
^^^^
In here we see that "stop" overrides the "noprint":
(gdb) handle SIGSEGV noprint stop
Signal Stop Print Pass to program Description
SIGSEGV Yes Yes Yes Segmentation fault
^^^^ ^^^^
So AFAIK, there's no way to end up with:
Signal Stop Print Pass to program Description
SIGSEGV Yes No Yes Segmentation fault
I think the intention here is that having GDB silently stop for a signal
would lead to a good deal of head scratching. More so even if the signal is
set to pass.
There's another way to get that behavior though, using "catch signal" along
with "silent" instead:
(gdb) catch signal SIGSEGV
Catchpoint 1 (signal SIGSEGV)
(gdb) commands
>silent
>end
(gdb) r
Starting program: ...
(gdb)
(The last prompt appeared because of a SIGSEGV: the program stopped silently)
Though I wonder if you _really_ wanted that behaviour in the first place...
--
You are receiving this mail because:
You are on the CC list for the bug.