Bug 223993 - Using /usr/lib/debug/boot/kernel/kernel.debug over /usr/obj/sys/GENERIC/kernel.debug (sbin/dumpon/dumpon.8)
Summary: Using /usr/lib/debug/boot/kernel/kernel.debug over /usr/obj/sys/GENERIC/kerne...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Eitan Adler
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-11-30 13:32 UTC by Trond Endrestøl
Modified: 2018-05-23 14:14 UTC (History)
1 user (show)

See Also:


Attachments
Patch for sbin/dumpon/dumpon.8 (547 bytes, patch)
2017-11-30 13:32 UTC, Trond Endrestøl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2017-11-30 13:32:50 UTC
Created attachment 188427 [details]
Patch for sbin/dumpon/dumpon.8

You are not guaranteed to be using the GENERIC kernel in every case, and since kernel debug files are more or less mandatory installed, I suggest using /usr/lib/debug/boot/kernel/kernel.debug over /usr/obj/sys/GENERIC/kernel.debug. The latter probably should be /usr/obj/usr/src/sys/GENERIC/kernel.debug, or in the case of amd64, /usr/obj/usr/src/amd64.amd64/sys/GENERIC/kernel.debug.
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-05-23 10:46:05 UTC
A commit references this bug:

Author: eadler
Date: Wed May 23 10:45:32 UTC 2018
New revision: 334089
URL: https://svnweb.freebsd.org/changeset/base/334089

Log:
  dumpon: point to better kernel debug symbols.

  The objdir is temporary, and the current example points to GENERIC.
  Instead point to the installed location of the debug symbols that are
  supposed to match the kernel you are using.

  PR:		223993
  Submitted by:	Trond.Endrestol@ximalas.info

Changes:
  head/sbin/dumpon/dumpon.8
Comment 2 Ed Maste freebsd_committer freebsd_triage 2018-05-23 14:14:13 UTC
The example should instead reference /boot/kernel/kernel or $(sysctl -n kern.bootfile) and kgdb will make use of the .gnu_debuglink section to locate the debug data.