DragonFly BSD
DragonFly kernel List (threaded) for 2011-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

System GDB 7.3 upgrade: Stuck on quirk with kgdb

From: John Marino <dragonflybsd@xxxxxxxxx>
Date: Sun, 10 Apr 2011 19:56:13 +0200

The GDB project is going to release GDB 7.3 in a few days. I thought this would be a good time to upgrade the debugger. Using their CVS from the recently created 7.3 branch, I was able to successfully build gdb and kgdb within the /usr/src infrastructure. The patches to upgrade the system debugger to 7.3 are here:

http://leaf.dragonflybsd.org/~marino/gdb73.patches.tar.bz2 (1.8M)

Regular gdb seems to work fine. The problem is with kgdb. The first issue that that typing "kgdb" at the prompt will show that the kernel module symbols aren't getting read in. By commenting out line 138 from gnu/usr.bin/gdb/kgdb/trgt.c and building again, the kernel modules will get read in as expected.

That line is: frame_unwind_prepend_unwinder(get_frame_arch(get_current_frame()), &kgdb_trgt_trapframe_unwind);

It was added 2009/12/28 here:

The second problem is the last line of output before you get the prompt on kdgb is "No registers.". Asking for a backtrace results in a display of "No stack.".

Both problems happen on both platforms. I don't have a clue about why the "default_child_has_registers" function from target.c is coming back as false (well, yes, because the inferior ptid structure is all zeros but I don't know why).

Anyway, I probably exhausted my skill just porting gdb and getting kgdb to build. I would be grateful for help fixing and testing kgdb so that we might bring it into base post-release 2.10. By the way, if you build k/gdb with debug flags, you can use the newly-built gdb to debug the newly-built kgdb.


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]