public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/25193] Incorrect reporting of line information for stap -v -L 'process("/usr/bin/ld.gold").statement("*@*:*")'
Date: Wed, 03 Jun 2020 14:42:17 +0000	[thread overview]
Message-ID: <bug-25193-6586-sDaCl90c96@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25193-6586@http.sourceware.org/bugzilla/>

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.

      parent reply	other threads:[~2020-06-03 14:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 21:36 [Bug translator/25193] New: " wcohen at redhat dot com
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 [this message]

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-sDaCl90c96@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).