Date: Tue, 5 Sep 1995 21:02:49 +0200
From: Andreas Busse <andy@waldorf-gmbh.de>
So. The GDB stub works so far. There are some minor problems
during startup of the host gdb, but as soon vmlinux executes
a break instruction and enters the gdb exception handler, the
communication syncs.
Andy, I guess since direct modification of registers is not working
you cannot call arbitrary functions in the kernel as of yet? I find
it a life saver at times to be able to do
(gdb) print show_free_areas()
and similar ;-) Also, you can do things like:
(gdb) print panic("gdb panics")
but only if you provide a 'malloc()' function in the kernel for the
stub to call to get a memory pool to store the string into. I
basically on the sparc allocate a page for gdb to alloc from and wrote
simple memory pool routines and a malloc() which is static in the stub
file itself, once the page is used up malloc() returns null. I find
this very useful personally (especially for debugging the mm code).
Later,
David S. Miller
davem@caip.rutgers.edu
|