Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sets Add support for debugging modules for multi-arc...
details: https://anonhg.NetBSD.org/src/rev/739e6f3a3139
branches: trunk
changeset: 932234:739e6f3a3139
user: christos <christos%NetBSD.org@localhost>
date: Sat May 02 19:44:59 2020 +0000
description:
Add support for debugging modules for multi-arch (xen etc.)
diffstat:
distrib/sets/sets.subr | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diffs (67 lines):
diff -r ce6f64b9b8ee -r 739e6f3a3139 distrib/sets/sets.subr
--- a/distrib/sets/sets.subr Sat May 02 19:35:03 2020 +0000
+++ b/distrib/sets/sets.subr Sat May 02 19:44:59 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.189 2020/05/01 22:21:49 christos Exp $
+# $NetBSD: sets.subr,v 1.190 2020/05/02 19:44:59 christos Exp $
#
#
@@ -184,7 +184,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.189 2020/05/01 22:21:49 christos Exp $
+# # $NetBSD: sets.subr,v 1.190 2020/05/02 19:44:59 christos Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@@ -254,6 +254,17 @@
fi
print_set_lists "$@" | \
${AWK} -v obsolete=${obsolete} '
+ function addkmod(line, fname, prefix, pat, patlen) {
+ if (substr(line, 1, patlen) != pat) {
+ return;
+ }
+ for (d in kmodarchdirs) {
+ xd = prefix kmodarchdirs[d]
+ xfile = xd substr(line, patlen + 1)
+ tmp = xd substr(fname, patlen + 1)
+ list[xfile] = tmp;
+ }
+ }
BEGIN {
if (obsolete)
wanted["obsolete"] = 1
@@ -298,8 +309,12 @@
if (("kmod" in wanted) && ("compatmodules" in wanted)) {
split("'"${KMODARCHDIRS}"'", kmodarchdirs, ",");
- kmodpat = "./stand/" ENVIRON["MACHINE"]
+ kmodprefix = "./stand/"
+ kmodpat = kmodprefix ENVIRON["MACHINE"]
l_kmodpat = length(kmodpat)
+ kmoddbprefix = "./usr/libdata/debug/stand/"
+ kmoddbpat = kmoddbprefix ENVIRON["MACHINE"]
+ l_kmoddbpat = length(kmoddbpat)
}
if ("'"${TOOLCHAIN_MISSING}"'" != "yes") {
@@ -391,13 +406,9 @@
next
list[$1] = $0
- if (havekmod > 0 && substr($1,1,l_kmodpat) == kmodpat) {
- for (d in kmodarchdirs) {
- xd = "./stand/" kmodarchdirs[d]
- xfile = xd substr($1, l_kmodpat+1)
- tmp = xd substr($0, l_kmodpat+1)
- list[xfile] = tmp;
- }
+ if (havekmod > 0) {
+ addkmod($0, $1, kmodprefix, kmodpat, l_kmodpat)
+ addkmod($0, $1, kmoddbprefix, kmoddbpat, l_kmoddbpat)
next
}
Home |
Main Index |
Thread Index |
Old Index