public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/16883] New: @var("name@file") should match decl_file, not compile_unit
@ 2014-04-29 19:13 jistone at redhat dot com
  0 siblings, 0 replies; only message in thread
From: jistone at redhat dot com @ 2014-04-29 19:13 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-29 19:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-29 19:13 [Bug translator/16883] New: @var("name@file") should match decl_file, not compile_unit jistone at redhat dot com

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