NetBSD Problem Report #55930

From paul@whooppee.com  Fri Jan 15 22:05:29 2021
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 479281A9217
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 15 Jan 2021 22:05:29 +0000 (UTC)
Message-Id: <20210115220525.DF37130F2C4@speedy.whooppee.com>
Date: Fri, 15 Jan 2021 14:05:25 -0800 (PST)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@NetBSD.org
Subject: KERNEL_DIR should co-locate module debug stuff with the modules
X-Send-Pr-Version: 3.95

>Number:         55930
>Category:       kern
>Synopsis:       KERNEL_DIR should co-locate module debug stuff with the modules themselves
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 15 22:10:00 +0000 2021
>Last-Modified:  Mon Jan 18 22:10:01 +0000 2021
>Originator:     Paul Goyette
>Release:        NetBSD 9.99.77
>Organization:
+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
+--------------------+--------------------------+-----------------------+
>Environment:


System: NetBSD speedy.whooppee.com 9.99.77 NetBSD 9.99.77 (SPEEDY 2020-12-09 16:52:22 UTC) #0: Thu Dec 10 00:56:59 UTC 2020 paul@speedy.whooppee.com:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/SPEEDY amd64
Architecture: x86_64
Machine: amd64
>Description:
	Currently, if you set KERNEL_DIR="yes", the loadable modules
	are placed in /netbsd/modules/... while the debug files for
	the modules are placed in /usr/libdata/debug/netbsd/modules/...

	This means that, when installing a test kernel+modules you have
	to make two copies.  It also requires a multi-step process to
	rollback (or revert) to the previous versions.

	I request that the module debug files be placed in the same
	directory as the loadable modules, /netbsd/modules/...  This
	would simplify the installation and rollback of test code.

	It does mean, that there will now be two places for debug info,
	one place for userland executables and libraries, and another
	place for modules However, this should not be a problem since
	the module stuff isn't userland anyway.

>How-To-Repeat:
	N/A
>Fix:
	N/A

>Audit-Trail:
From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/55930: KERNEL_DIR should co-locate module debug stuff with
 the modules
Date: Mon, 18 Jan 2021 14:07:42 -0800 (PST)

 > 	It does mean, that there will now be two places for debug info,
 > 	one place for userland executables and libraries, and another
 > 	place for modules However, this should not be a problem since
 > 	the module stuff isn't userland anyway.

 Actually, it might actually help when using the gdb scripts that load
 module symbol tables, since module_base will point to the directory
 from which the module executable code is loaded.  The debug info would
 not be found if it is left in /usr/libdata/debug/... (if I understand
 the sys/gdbscripts/modload script correctly).


 +--------------------+--------------------------+-----------------------+
 | Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
 | (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
 | Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
 +--------------------+--------------------------+-----------------------+

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.