Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147596742
D3785.id9055.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3785.id9055.diff
View Options
Index: usr.sbin/pmcstat/pmcstat_log.c
===================================================================
--- usr.sbin/pmcstat/pmcstat_log.c
+++ usr.sbin/pmcstat/pmcstat_log.c
@@ -966,21 +966,34 @@
char *funcname, size_t funcname_len)
{
static int addr2line_warn = 0;
- unsigned l;
char *sep, cmdline[PATH_MAX], imagepath[PATH_MAX];
+ unsigned l;
int fd;
if (image->pi_addr2line == NULL) {
- snprintf(imagepath, sizeof(imagepath), "%s%s.symbols",
+ /* Try default debug file location.
+ */
+ snprintf(imagepath, sizeof(imagepath),
+ "/usr/lib/debug/%s%s.debug",
args.pa_fsroot,
pmcstat_string_unintern(image->pi_fullpath));
fd = open(imagepath, O_RDONLY);
if (fd < 0) {
- snprintf(imagepath, sizeof(imagepath), "%s%s",
+ /* Old kernel symbol path.
+ */
+ snprintf(imagepath, sizeof(imagepath), "%s%s.symbols",
args.pa_fsroot,
pmcstat_string_unintern(image->pi_fullpath));
- } else
+ fd = open(imagepath, O_RDONLY);
+ if (fd < 0) {
+ snprintf(imagepath, sizeof(imagepath), "%s%s",
+ args.pa_fsroot,
+ pmcstat_string_unintern(
+ image->pi_fullpath));
+ }
+ }
+ if (fd >= 0)
close(fd);
/*
* New addr2line support recursive inline function with -i
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 13, 5:31 AM (18 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29610471
Default Alt Text
D3785.id9055.diff (1 KB)
Attached To
Mode
D3785: Fix handling .debug file instead of .symbols
Attached
Detach File
Event Timeline
Log In to Comment