Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jul 2004 07:09:46 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 57906 for review
Message-ID:  <200407220709.i6M79k5P090059@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=57906

Change 57906 by marcel@marcel_nfs on 2004/07/22 07:08:50

	kgdb #2. This implementation is based on kgdb #1 that's in
	src/usr.bin/kgdb. This implementation links against libgdb
	directly instead of using the remote protocol as IPC with
	gdb(1). For that reason kgdb #2 is in src/gnu/usr.bin/gdb.
	
	The advantage of linking against libgdb is that we can make
	use of all the hooks that libgdb provides us, as well as
	push our own target onto the target stack and install a
	frame sniffer to deal with trapframes.
	
	It is also expected that this approach allows us to support
	relocatable kernel modules, although I have no clue how ATM.
	
	These new files provide:
	o  A minimal manpage (can't be bad).
	o  An implementation for main() that invokes gdb_main().
	   This gives us the debugger prompt and all the functionality
	   that one is used to.
	o  A gdb init hook that sets the prompt and loads the selected
	   kernel as the symbol file.
	o  The loading of the core file with -lkvm.
	o  The kernel thread support functions.
	
	What is needed to make it a functional kernel debugger:
	o  A new target that groks the kernel threads, uses -lkvm to
	   read from the core file and provides for the necessary
	   register fetching.
	o  Some smartness to automaticly load the kernel modules
	   as additional symbol files.
	o  A bunch of commands to aid in debugging.

Affected files ...

.. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/Makefile#1 add
.. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/kgdb.1#1 add
.. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/kgdb.h#1 add
.. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/kthr.c#1 add
.. //depot/projects/gdb/gnu/usr.bin/gdb/kgdb/main.c#1 add

Differences ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407220709.i6M79k5P090059>