Date: Fri, 9 Mar 2007 17:23:07 -0500 (EST) From: "Mikhail T." <mi@aldan.algebra.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: kan@FreeBSD.org, marcel@FreeBSD.org Subject: bin/110146: Allow arbitrary gdb options to bypass kgdb Message-ID: <200703092223.l29MN7Nl008047@aldan.algebra.com> Resent-Message-ID: <200703092230.l29MU5tG071344@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 110146 >Category: bin >Synopsis: Allow arbitrary gdb options to bypass kgdb >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Mar 09 22:30:05 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: FreeBSD 6.2-STABLE amd64 >Organization: Virtual Estates, Inc. (http://libpipe.virtual-estates.com/) >Environment: System: FreeBSD aldan.algebra.com 6.2-STABLE FreeBSD 6.2-STABLE #1: Fri Mar 2 02:11:01 EST 2007 root@aldan.algebra.com:/meow/obj/var/src/sys/SILVER amd64 >Description: Currently, no gdb options can be given to kgdb -- except the specially-handled -q and -f. This is unfortunate -- in particular, the `-x script' option is missing, but possibly others. The patch below modifies kgdb to: . allow anything after the kernel/core to be sent to gdb_main; . eats all options recognized by kgdb itself; . removes some redundant strdups . re-arrange the command-line loop handling a bit to avoid our own wrapper. The following command now becomes possible, for example: kgdb -v -c /home/mi/crash/vmcore.1 kernel.debug -x script.txt The command-line handling could be improved further to allow mixing of gdb and kgdb options (except where they overlap), but that is, probably, not needed. The common usage (as specified in Handbook) shows kernel.debug and vmcore explicitly... >How-To-Repeat: >Fix: The up-to-date patch can be found at http://aldan.algebra.com/~mi/kgdb-gdb.patch >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703092223.l29MN7Nl008047>