This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/25193] New: Incorrect reporting of line information for stap -v -L 'process("/usr/bin/").statement("*@*:*")'

            Bug ID: 25193
           Summary: Incorrect reporting of line information for stap -v -L
           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

stap -v -L 'process("/usr/bin/").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:

/* pc=.dynamic+0x189925 */ $this:struct Abbrev_code* const
/* pc=.dynamic+0x189925 */ $this:struct
std::allocator<gold::Dwarf_abbrev_table::Attribute> >* const $__n:size_t
/* pc=.dynamic+0x189925 */ $__a:allocator_type& $__n:size_type $__p:pointer
/* pc=.dynamic+0x189925 */ $this:class
new_allocator<gold::Dwarf_abbrev_table::Attribute>* const $__p:pointer
/* pc=.dynamic+0x189925 */ $len:size_t $nextcode:uint64_t $this:class
Dwarf_abbrev_table* const $code:unsigned int
/* 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/" it maps to the

alloc_traits.h                               469            0x189925

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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]