This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/12663] New: statement probes on inlined-function-call sites: search .debug_line PLUS .debug_info
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 11 Apr 2011 17:38:16 +0000
- Subject: [Bug translator/12663] New: statement probes on inlined-function-call sites: search .debug_line PLUS .debug_info
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12663
Summary: statement probes on inlined-function-call sites:
search .debug_line PLUS .debug_info
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap@sourceware.org
ReportedBy: fche@redhat.com
By searching only .debug_line data, we miss some statement-probing
opportunities. For example, on current rawhide, the lines corresponding
to the function foo() cannot be selected for statement probing:
1 inline void foo () {
2 __asm__ __volatile__ ("nop");
3 }
4
5 int main () {
6 int i = 0;
7 foo ();
8 i = 1;
9 foo ();
10 return i;
11 }
% stap -L 'process("a.out").statement("*@foo.c:*")'
process("/tmp/a.out").statement("foo@/tmp/foo.c:1")
process("/tmp/a.out").statement("foo@/tmp/foo.c:2")
process("/tmp/a.out").statement("foo@/tmp/foo.c:3")
process("/tmp/a.out").statement("main@/tmp/foo.c:11") $i:int
process("/tmp/a.out").statement("main@/tmp/foo.c:5") $i:int
Note how foo.c:7 and foo.c:9 are missing.
% objdump --dwarf=decodedline a.out
foo.c 1 0x80483a0
foo.c 2 0x80483a3
foo.c 3 0x80483a4
foo.c 5 0x80483b0
foo.c 2 0x80483b3
foo.c 11 0x80483b5
whereas in the main .debug_info section:
....
<2><64>: Abbrev Number: 6 (DW_TAG_inlined_subroutine)
<65> DW_AT_abstract_origin: <0x25>
<69> DW_AT_low_pc : 0x80483b3
<6d> DW_AT_high_pc : 0x80483b4
<71> DW_AT_call_file : 1
<72> DW_AT_call_line : 7
<2><73>: Abbrev Number: 6 (DW_TAG_inlined_subroutine)
<74> DW_AT_abstract_origin: <0x25>
<78> DW_AT_low_pc : 0x80483b4
<7c> DW_AT_high_pc : 0x80483b5
<80> DW_AT_call_file : 1
<81> DW_AT_call_line : 9
....
so we have line :9 info right there, along with DW_AT_low_pc values we
could use to probe. Systemtap (in guru mode) is even willing to place
a statement probe at those addresses. Let's let stap resolve such
inlined-subroutine-calls for statement probes.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.