public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/16883] New: @var("name@file") should match decl_file, not compile_unit
Date: Tue, 29 Apr 2014 19:13:00 -0000	[thread overview]
Message-ID: <bug-16883-6586@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 16883
           Summary: @var("name@file") should match decl_file, not
                    compile_unit
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: jistone at redhat dot com

When we search for function("name@file"), we collect each CU's matching
dwarf_getsrcfiles() in dwflpp::collect_srcfiles_matching(), and then match the
function's decl_file to that set.  Currently @var only compares the
compile_unit's name, but I think it should use the same decl_file mechanism.

Certainly the compile_unit name will be among dwarf_getsrcfiles(), but it's not
always a 1:1 match.  That name appears to be the original path as given to the
compiler, but srcfiles are sometimes stored as a full path.

Plus, the variable may have been defined in some other file that was included
in the CU, and IMO it's more natural to expect @var to match the file name that
defined it, rather than whatever CU included it.

There's also some globbing difference.  Currently @var matches either "file"
exactly or fnmatch "*/file".  So if users had wildcards themselves, they would
only work in the latter case with the prefix "*/" added.  The dwflpp matching
tries "file" and "*/file" both as fnmatch patterns.

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

                 reply	other threads:[~2014-04-29 19:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-16883-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).