public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug breakpoints/16889] New: gdb segfaults when printing ASM SDT arguments Date: Wed, 30 Apr 2014 22:13:00 -0000 [thread overview] Message-ID: <bug-16889-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=16889 Bug ID: 16889 Summary: gdb segfaults when printing ASM SDT arguments Product: gdb Version: 7.6 Status: NEW Severity: normal Priority: P2 Component: breakpoints Assignee: unassigned at sourceware dot org Reporter: jistone at redhat dot com CC: sergiodj at redhat dot com Created attachment 7571 --> https://sourceware.org/bugzilla/attachment.cgi?id=7571&action=edit example x86_64 asm source with sdt probes With a program compiled from the attached asm source, gdb is unable to print the arguments, and actually segfaults on the second probe. $ gcc -Wall probe.S -o probe $ eu-readelf -n probe [...] Note section [28] '.note.stapsdt' of 128 bytes at offset 0x1058: Owner Data size Type stapsdt 41 Version: 3 PC: 0x4004f5, Base: 0x400590, Semaphore: 0 Provider: probe, Name: foo, Args: '(%rsp)' stapsdt 43 Version: 3 PC: 0x4004f6, Base: 0x400590, Semaphore: 0 Provider: probe, Name: bar, Args: '-8(%rbp)' $ gdb ./probe [...] (gdb) b -p foo Breakpoint 1 at 0x4004f5 (gdb) b -p bar Breakpoint 2 at 0x4004f6 (gdb) r Starting program: /home/jistone/test/probe Breakpoint 1, 0x00000000004004f5 in main () (gdb) p $_probe_arg0 Invalid probe argument 0 -- probe has 0 arguments available (gdb) c Continuing. Breakpoint 2, 0x00000000004004f6 in main () (gdb) p $_probe_arg0 Segmentation fault So probe 'foo' can't find the (%rsp) argument, but probe 'bar' just crashes. If I add the optional N@ size, so they are "8@(%rsp)" and "8@-8(%rbp)", then they are both fine. I'm using gdb-7.6.50.20130731-19.fc20.x86_64 -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2014-04-30 22:13 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-30 22:13 jistone at redhat dot com [this message] 2014-04-30 22:19 ` [Bug breakpoints/16889] " sergiodj at redhat dot com 2014-05-01 21:54 ` sergiodj at redhat dot com 2014-05-02 20:53 ` cvs-commit at gcc dot gnu.org 2014-05-02 20:55 ` sergiodj 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-16889-4717@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).