This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/16889] New: gdb segfaults when printing ASM SDT arguments
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 30 Apr 2014 22:13:43 +0000
- Subject: [Bug breakpoints/16889] New: gdb segfaults when printing ASM SDT arguments
- Auto-submitted: auto-generated
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.