HomeFreeBSD

libproc: Improve .gnu_debuglink support.

Description

libproc: Improve .gnu_debuglink support.

As of r278658 libproc looks for debug files under /usr/lib/debug and will
use them if available. This change fleshes out that support a bit further:

  • Check for a .gnu_debuglink section and use the file name specified there if one is present.
  • Validate external debug files with the CRC in the .gnu_debuglink section so as to avoid using stale or corrupt debug files.
  • Search for debug files in the directory containing the referencing object or in the .debug subdirectory, as GDB does.

Details

Provenance
markjAuthored on
Parents
rS309592: libproc: Make proc_getpid() an accessor for struct proc_handle.
Branches
Unknown
Tags
Unknown