bin/110146: Allow arbitrary gdb options to bypass kgdb

Mikhail T. mi at aldan.algebra.com
Fri Mar 9 22:30:06 UTC 2007


>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 at 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:


More information about the freebsd-bugs mailing list