From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/25193] New: Incorrect reporting of line information for stap -v -L 'process("/usr/bin/ld.gold").statement("*@*:*")'
Date: Thu, 14 Nov 2019 21:36:00 -0000 [thread overview]
Message-ID: <bug-25193-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=25193
Bug ID: 25193
Summary: Incorrect reporting of line information for stap -v -L
'process("/usr/bin/ld.gold").statement("*@*:*")'
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: wcohen at redhat dot com
Target Milestone: ---
The mechanism determining the line number from the debuginfo is getting the
line information incorrect. This was observed on Fedora 30 with
binutils-2.31.1-29.fc30.x86_64:
stap -v -L 'process("/usr/bin/ld.gold").statement("*@*:*")'
Provides a huge number of statements at line 128 for different files. It turns
out this is due to gcc c++ compiler inlining line 128 from
/usr/include/c++/9/ext/new_allocator.h in many different places. The line 128
makes sense for the new_allocator.h head file but not for the other statement
probe points at the same instruction:
process("/usr/bin/ld.gold").statement("Abbrev_code@/usr/src/debug/binutils-2.31.1-29.fc30.x86_64/gold/dwarf_reader.h:128")
/* pc=.dynamic+0x189925 */ $this:struct Abbrev_code* const
process("/usr/bin/ld.gold").statement("_M_deallocate@/usr/include/c++/9/bits/stl_vector.h:128")
/* pc=.dynamic+0x189925 */ $this:struct
_Vector_base<gold::Dwarf_abbrev_table::Attribute,
std::allocator<gold::Dwarf_abbrev_table::Attribute> >* const $__n:size_t
$__p:pointer
process("/usr/bin/ld.gold").statement("deallocate@/usr/include/c++/9/bits/alloc_traits.h:128")
/* pc=.dynamic+0x189925 */ $__a:allocator_type& $__n:size_type $__p:pointer
process("/usr/bin/ld.gold").statement("deallocate@/usr/include/c++/9/ext/new_allocator.h:128")
/* pc=.dynamic+0x189925 */ $this:class
new_allocator<gold::Dwarf_abbrev_table::Attribute>* const $__p:pointer
process("/usr/bin/ld.gold").statement("do_get_abbrev@/usr/src/debug/binutils-2.31.1-29.fc30.x86_64/gold/dwarf_reader.cc:128")
/* pc=.dynamic+0x189925 */ $len:size_t $nextcode:uint64_t $this:class
Dwarf_abbrev_table* const $code:unsigned int
process("/usr/bin/ld.gold").statement("reserve@/usr/include/c++/9/bits/vector.tcc:128")
/* pc=.dynamic+0x189925 */ $__old_size:size_type const $__tmp:pointer
$__n:size_type $this:class vector<gold::Dwarf_abbrev_table::Attribute,
std::allocator<gold::Dwarf_abbrev_table::Attribute> >* const
According to "readelf --wide -wLK
/usr/lib/debug/usr/bin/ld.gold-2.31.1-29.fc30.x86_64.debug" it maps to the
following:
/usr/include/c++/9/bits/alloc_traits.h:
alloc_traits.h 469 0x189925
/usr/include/c++/9/ext/new_allocator.h:
new_allocator.h 119 0x189925 1
new_allocator.h 128 0x189925 2
It appears that stap is always using the last view's line number information
regardless of the view.
fche suggested that the problem might be in tapsets.cxx:query_srcfile_line.
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2019-11-14 21:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 21:36 wcohen at redhat dot com [this message]
2020-05-12 18:18 ` [Bug translator/25193] " wcohen at redhat dot com
2020-05-12 18:54 ` wcohen at redhat dot com
2020-05-15 18:32 ` wcohen at redhat dot com
2020-05-18 18:08 ` wcohen at redhat dot com
2020-06-03 14:42 ` wcohen 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-25193-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@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).