This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/16883] New: @var("name at file") should match decl_file, not compile_unit


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]