[Bug 163602] pmcstat(8) doesn't search symbols under /boot/modules

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Mar 25 22:28:47 UTC 2016


--- Comment #4 from John Baldwin <jhb at FreeBSD.org> ---
To be clear, prior to r282643, pmcstat always used /boot/kernel/kernel no
matter what you booted (/boot/foo/kernel, or /boot/kernel/kernel.gz).  OTOH,
it's not clear to me why pmcstat needs to do its own manual search in the
module path to begin with.  The kernel stores the full path to each module
(it's output if you use kldstat -v).  That is what kgdb uses to find module
symbols rather than trying to guess by doing its own lookup.

It would be very trivial to fix pmc to export the full path instead.  Just
change the hwpmc hook in sys/kern/kern_linker.c to use 'lf->pathname' instead
of 'lf->filename'.  pmcstat could then use that path if it exists (or perhaps
accept a '--sysroot' type option similar to solib-prefix in gdb for use when
doing offline analysis on another machine)

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

More information about the freebsd-bugs mailing list