From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49325 invoked by alias); 12 Jun 2015 10:19:00 -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 49290 invoked by uid 48); 12 Jun 2015 10:19:00 -0000 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/17970] cannot call any function or method with "print" or "call" after command "handle SIGSEGV noprint pass" Date: Fri, 12 Jun 2015 10:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.8 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palves at redhat dot com 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: cc 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-q2/txt/msg00408.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17970 Pedro Alves changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |palves at redhat dot com --- Comment #8 from Pedro Alves --- 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.