Add a new action kernel.gdb=MYCONF to build a kernel with debuginfo

(and generate netbsd.gdb)
This commit is contained in:
martin 2014-05-05 19:12:19 +00:00
parent c72d415969
commit be27ff5209
1 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/env sh
# $NetBSD: build.sh,v 1.280 2014/04/29 11:52:51 uebayasi Exp $
# $NetBSD: build.sh,v 1.281 2014/05/05 19:12:19 martin Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@ -922,6 +922,8 @@ Usage: ${progname} [-EhnorUuxy] [-a arch] [-B buildid] [-C cdextras]
install=idir Run "make installworld" to \`idir' to install all sets
except \`etc'. Useful after "distribution" or "release"
kernel=conf Build kernel with config file \`conf'
kernel.gdb=conf Build kernel (including netbsd.gdb) with config
file \`conf'
releasekernel=conf Install kernel built by kernel=conf to RELEASEDIR.
installmodules=idir Run "make installmodules" to \`idir' to install all
kernel modules.
@ -1220,7 +1222,7 @@ parseoptions()
op=install_image # used as part of a variable name
;;
kernel=*|releasekernel=*)
kernel=*|releasekernel=*|kernel.gdb=*)
arg=${op#*=}
op=${op%%=*}
[ -n "${arg}" ] ||
@ -1746,7 +1748,7 @@ createmakewrapper()
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
# Generated from: \$NetBSD: build.sh,v 1.280 2014/04/29 11:52:51 uebayasi Exp $
# Generated from: \$NetBSD: build.sh,v 1.281 2014/05/05 19:12:19 martin Exp $
# with these arguments: ${_args}
#
@ -1861,7 +1863,7 @@ buildkernel()
[ -x "${TOOLDIR}/bin/${toolprefix}config" ] \
|| bomb "${TOOLDIR}/bin/${toolprefix}config does not exist. You need to \"$0 tools\" first."
${runcmd} "${TOOLDIR}/bin/${toolprefix}config" -b "${kernelbuildpath}" \
-s "${TOP}/sys" "${kernelconfpath}" ||
${ksymopts} -s "${TOP}/sys" "${kernelconfpath}" ||
bomb "${toolprefix}config failed for ${kernelconf}"
make_in_dir "${kernelbuildpath}" depend
make_in_dir "${kernelbuildpath}" all
@ -2100,7 +2102,11 @@ main()
arg=${op#*=}
buildkernel "${arg}"
;;
kernel.gdb=*)
arg=${op#*=}
ksymopts="-D DEBUG=-g"
buildkernel "${arg}"
;;
releasekernel=*)
arg=${op#*=}
releasekernel "${arg}"