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

wcohen at redhat dot com sourceware-bugzilla@sourceware.org
Wed Jun 3 14:42:17 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=25193

--- Comment #5 from William Cohen <wcohen at redhat dot com> ---
GDB has some ability to provide backtraces that include inlined functions. 
Should see how gdb is able to get that information about source line and
function name.

Used following to find an inlined function to set a breakpoint on: 
$  stap -v -L 'process("./multiple_views").function("*").inline'


$ gdb multiple_views 
...
(gdb) break _M_set_length
Breakpoint 1 at 0x4010dd: file /usr/include/c++/10/bits/basic_string.h, line
214.
(gdb) run
Starting program: /home/wcohen/multiple_views 
Missing separate debuginfo for /lib64/libstdc++.so.6
Try: dnf --enablerepo='*debug*' install
/usr/lib/debug/.build-id/7a/fd1ced0ad3b1fdfe1b121ae292881439af5e57.debug

Breakpoint 1, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_set_length (__n=12, 
    this=0x7fffffffd7d0) at /usr/include/c++/10/bits/basic_string.h:217
217             traits_type::assign(_M_data()[__n], _CharT());
(gdb) where
#0  std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_set_length (__n=12, 
    this=0x7fffffffd7d0) at /usr/include/c++/10/bits/basic_string.h:217
#1  std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_construct<char const*> (
    __end=0x40201c "", __beg=0x402010 "hello world\n", this=0x7fffffffd7d0) at
/usr/include/c++/10/bits/basic_string.tcc:232
#2  std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_construct_aux<char const*> (
    __end=0x40201c "", __beg=0x402010 "hello world\n", this=0x7fffffffd7d0) at
/usr/include/c++/10/bits/basic_string.h:247
#3  std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_M_construct<char const*> (
    __end=0x40201c "", __beg=0x402010 "hello world\n", this=0x7fffffffd7d0) at
/usr/include/c++/10/bits/basic_string.h:266
#4  std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string (__a=..., 
    __s=0x402010 "hello world\n", this=0x7fffffffd7d0) at
/usr/include/c++/10/bits/basic_string.h:527
#5  main (argc=<optimized out>, argv=<optimized out>) at multiple_views.cc:8
(gdb) p/x $pc
$1 = 0x4010dd

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Systemtap mailing list