[Bug 260979] libproc can fail to find debug symbols for jailed processes

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 06 Jan 2022 16:32:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260979

            Bug ID: 260979
           Summary: libproc can fail to find debug symbols for jailed
                    processes
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: markj@FreeBSD.org

libproc knows about the .gnu_debuglink extension and will use it to find
external debug files so that it can use them to do symbol resolution.  When
debugging a problem with lwhsu, we found that this doesn't quite work if the
process is jailed but the debugger is running in the jail host.

What libproc does is look up the path of a mapped file, check it for
.gnu_debuglink, and then try to read /usr/lib/debug/<path to DSO>.debug.  On
the jail host, this path should really be <jail root>/usr/lib/debug/<path to
DSO with jail root trimmed>.  In particular, libproc will fail to find the
debug info.  gdb has the same problem it seems.

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