public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug breakpoints/16812] SIGSEGV running program after using dprintf-style call and -dprintf-insert Date: Thu, 19 Feb 2015 16:12:00 -0000 [thread overview] Message-ID: <bug-16812-4717-d1Lu82nPPl@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-16812-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=16812 --- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Antoine Tremblay <hexa@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c9587f88230e9df836f17c195181aaf50c3a1117 commit c9587f88230e9df836f17c195181aaf50c3a1117 Author: Antoine Tremblay <antoine.tremblay@ericsson.com> Date: Thu Feb 12 14:55:08 2015 -0500 Fix non executable stack handling when calling functions in the inferior. When gdb creates a dummy frame to execute a function in the inferior, the process may generate a SIGSEGV, SIGTRAP or SIGILL because the stack is non executable. If the signal handler set in gdb has option print or stop enabled for these signals gdb handles this correctly. However, in the case of noprint and nostop the signal is short-circuited and the inferior process is sent the signal directly. This causes the inferior to crash because of gdb. This patch adds a check for SIGSEGV, SIGTRAP or SIGILL so that these signals are sent to gdb rather than short-circuited in the inferior. gdb then handles them properly and the inferior process does not crash. This patch also fixes the same behavior in gdbserver. Also added a small testcase to test the issue called catch-gdb-caused-signals. This applies to Linux only, tested on Linux. gdb/ChangeLog: PR breakpoints/16812 * linux-nat.c (linux_nat_filter_event): Report SIGTRAP,SIGILL,SIGSEGV. * nat/linux-ptrace.c (linux_wstatus_maybe_breakpoint): Add. * nat/linux-ptrace.h: Add linux_wstatus_maybe_breakpoint. gdb/gdbserver/ChangeLog: PR breakpoints/16812 * linux-low.c (wstatus_maybe_breakpoint): Remove. (linux_low_filter_event): Update wstatus_maybe_breakpoint name. (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV. gdb/testsuite/ChangeLog: PR breakpoints/16812 * gdb.base/catch-gdb-caused-signals.c: New file. * gdb.base/catch-gdb-caused-signals.exp: New file. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2015-02-19 16:09 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-06 5:58 [Bug breakpoints/16812] New: " malaperle at gmail dot com 2014-04-06 5:59 ` [Bug breakpoints/16812] " malaperle at gmail dot com 2014-04-06 6:05 ` malaperle at gmail dot com 2014-04-07 14:26 ` simon.marchi at polymtl dot ca 2014-04-09 15:32 ` malaperle at gmail dot com 2015-02-10 18:52 ` antoine.tremblay at ericsson dot com 2015-02-19 16:12 ` cvs-commit at gcc dot gnu.org [this message] 2015-02-19 18:19 ` antoine.tremblay at ericsson dot com 2015-06-15 8:56 ` palves at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-16812-4717-d1Lu82nPPl@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).