public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "malaperle at gmail dot com" <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: Wed, 09 Apr 2014 15:32:00 -0000	[thread overview]
Message-ID: <bug-16812-4717-n1X8YBKYdl@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 #2 from Marc-Andre Laperle <malaperle at gmail dot com> ---
I'm sorry, I have to rectify the steps to reproduce the bug. I had a .gdbinit
file in my home directory that affected the behavior. Here are the correct
steps:

(gdb) 
handle SIGSEGV nostop noprint
&"handle SIGSEGV nostop noprint\n"
~"Signal        Stop\tPrint\tPass to program\tDescription\n"
~"SIGSEGV       No\tNo\tYes\t\tSegmentation fault\n"
^done
(gdb) 
-gdb-set dprintf-style call
^done
(gdb) 
-dprintf-insert test.cpp:13 "hello"
^done,bkpt={number="1",type="dprintf",disp="keep",enabled="y",addr="0x0000000000400861",func="main()",file="test.cpp",fullname="/home/emalape/git/gdb-7.7/install/bin/test.cpp",line="13",thread-groups=["i1"],times="0",script={"call
(void) printf (\"hello\")"},original-location="test.cpp:13"}
(gdb) 
r
&"r\n"
~"Starting program: /home/emalape/git/gdb-7.7/install/bin/test \n"
=thread-group-started,id="i1",pid="28110"
=thread-created,id="1",group-id="i1"
^running
...
=library-loaded,id="/lib/x86_64-linux-gnu/libgcc_s.so.1",target-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",host-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",symbols-loaded="0",thread-group="i1"
=breakpoint-modified,bkpt={number="1",type="dprintf",disp="keep",enabled="y",addr="0x0000000000400861",func="main()",file="test.cpp",fullname="/home/emalape/git/gdb-7.7/install/bin/test.cpp",line="13",thread-groups=["i1"],times="0",script={"call
(void) printf (\\"hello\\")"},original-location="test.cpp:13"}
=breakpoint-modified,bkpt={number="1",type="dprintf",disp="keep",enabled="y",addr="0x0000000000400861",func="main()",file="test.cpp",fullname="/home/emalape/git/gdb-7.7/install/bin/test.cpp",line="13",thread-groups=["i1"],times="1",script={"call
(void) printf (\\"hello\\")"},original-location="test.cpp:13"}
~"\nProgram terminated with signal "
~"SIGSEGV, Segmentation fault.\n"
~"The program no longer exists.\n"
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
*stopped
Aborted



If only nostop is used then it works correctly:
handle SIGSEGV nostop

-- 
You are receiving this mail because:
You are on the CC list for the bug.


  parent reply	other threads:[~2014-04-09 15:32 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 [this message]
2015-02-10 18:52 ` antoine.tremblay at ericsson dot com
2015-02-19 16:12 ` cvs-commit at gcc dot gnu.org
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-n1X8YBKYdl@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: link
Be 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).