[haiku-gsoc] Re: Kernel GDB stubs

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Wed, 01 Jun 2011 22:22:46 +0200

Mike Smith wrote:
> IRC didn't really have a good answer for this, so I'll ask here:
> KDL seems to have GDB stubs (it has a 'gdb' command, at least) - is
> there any documentation on using this feature?

Only the source code. The feature is really rudimentary, so don't expect much. 
You basically only get a nicer stack trace with parameter values and can 
inspect variables. It's still somewhere on my virtual TODO list to improve the 

After staring the gdb command it acts as a debug stub for gdb. You have to 
connect gdb to it via serial line. Check the gdb documentation how to do that. 
IIRC it's something like a "remote" command or setting. I believe you can even 
get the KDL prompt back somehow (check the sources -- maybe it's even just by 
disconnected gdb). Last time I checked, it wasn't possible to load a Haiku 
kernel built with gcc 2 and debug info in any gdb I tried (both Haiku's and 
several version under Linux). They all either crashed or hung. With the gcc 4 
kernel it worked fine, though.

CU, Ingo

Other related posts: