This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/24419] New: stap -l 'process("p")statement ("func@file:N") sometimes displays relative paths
- From: "scox at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 04 Apr 2019 13:55:51 +0000
- Subject: [Bug translator/24419] New: stap -l 'process("p")statement ("func@file:N") sometimes displays relative paths
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=24419
Bug ID: 24419
Summary: stap -l 'process("p")statement ("func@file:N")
sometimes displays relative paths
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: scox at redhat dot com
Target Milestone: ---
subdirectory paths are sometimes displayed as relative with
statement("function@file:line") probes. e.g.
("tracing_backend_handle_arg@/work/scox/strace/scoxsrc/tracing_backend.h:159")
versus
("gdb_handle_arg@gdbserver/gdbserver.c:1280")
dwflpp.cxx::dwflpp::collect_srcfiles_matching needs to do something similar to
below to get pp() to return statement("func@/path/to/subdir/file.c:N") instead
of current "func@subdir/file.c:N"
char const *fname = dwarf_diename (die);
if (fname != NULL)
{
if (fname[0] != '/')
{
/* Relative path, get CU comp_dir. This is really too generic,
because we know this is the CU die already... */
const char *fdir;
Dwarf_Die cudie;
Dwarf_Attribute cdattr;
fdir = dwarf_formstring (dwarf_attr (dwarf_diecu (die,
&cudie,
NULL,
NULL),
DW_AT_comp_dir,
&cdattr));
check_it (fdir == NULL, "dwarf_formstring comp_dir");
printf ("### %s/%s\n", fdir, fname);
}
else
printf ("### %s\n", fname);
}
off = noff;
}
--
You are receiving this mail because:
You are the assignee for the bug.