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: Fri, 15 May 2020 18:32:06 +0000	[thread overview]
Message-ID: <bug-25193-6586-JM7BGoIJ8m@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 #3 from William Cohen <wcohen at redhat dot com> ---
Here is what happening:

1) dwflpp.cxx template iterate_over_srcfile_lines focuses on individual srcfile
it uses collect_all_lines (dwflpp.cxx:1914) to generate a vector of the
addresses (variable matching_lines). The elements of matching_lines includes
information about the file, line, column
2) However, the loop dwflpp.cxx:1972 doesn't pass that file information.
3) Instead tapsets.cxx query_srcfile_line tries to infer/regenerate it from the
address by seeing if the address are contained in any of the elements of bfis.
4) query_srcfile_line mis-matches as the criteria ends up being whether the 
address is contained within the items returned by q->filtered_all() rather than
the function/line/source file match up.
5) The lineno passed into query_srcfile_line() is paired with unrelated
functions and file names as observed in the example causing the reproducer to
list lines that do not exist in reality.

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

  parent reply	other threads:[~2020-05-15 18:32 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 [this message]
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-JM7BGoIJ8m@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).