From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22983 invoked by alias); 13 Jun 2015 11:00:51 -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 22953 invoked by uid 48); 13 Jun 2015 11:00:50 -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: Sat, 13 Jun 2015 11:00: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: 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/msg00419.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17970 --- Comment #11 from Pedro Alves --- If, when you _don't_ do any "handle" at all, the function call succeeds without a SIGSEGV, then please show "set debug infrun 1 + set debug lin-lwp 1" logs, in both cases of "handle" and no "handle" commands issued. Nowadays GDB puts the dummy breakpoint on the stack, and given that stack memory is not supposed to be executable permissions, it results in a SIGSEGV that GDB internally translates to a SIGSEGV. E.g., here what I see on F20: (gdb) p malloc (0) ... LLW: waitpid 29483 received Segmentation fault (stopped) ... infrun: target_wait (-1, status) = infrun: 29483 [Thread 0x7ffff7fc2740 (LWP 29483)], infrun: status->kind = stopped, signal = GDB_SIGNAL_SEGV infrun: Treating signal as SIGTRAP ... $1 = (void *) 0x602010 (gdb) si ... LLR: PTRACE_SINGLESTEP process 29483, 0 (resume event thread) ... 37 args[i] = 1; /* Init value. */ (gdb) That 0 in PTRACE_SINGLESTEP line means that GDB suppressed the signal. -- You are receiving this mail because: You are on the CC list for the bug.