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: Sat, 13 Jun 2015 11:00:49 +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
--- Comment #11 from Pedro Alves <palves at redhat dot com> ---
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.