[parisc-linux] Initial port of kdb to parisc-linux

Randolph Chung Randolph Chung <randolph@tausq.org>
Sun, 31 Mar 2002 18:19:11 -0800


Greetings,

It's amazing how much you can get done when you are procrastinating from
doing what you are supposed to be doing. The result, a first cut of a
port of SGI's kdb to parisc-linux.

There is a patch against kdb version 2.1 at
ftp://ftp.parisc-linux.org/patches/kdb-v2.1-2.4.18-pa11-parisc-1.bz2

It is meant to be applied over the kdb-v2.1-2.4.18-common-2.bz2 patch.
(I would give a url, but sgi's ftp site seems to be down as i write
this)

The basic commands like disassembly, memory/register dumps, setting breakpoints,
backtracing, etc work. Single stepping does not yet work though. Also, right 
now this only works on 32-bit kernels. There are a few things that need to be
fixed for 64-bit to work -- 

1. modutils doesn't handle building 64-bit kdb-enabled kernels when running 
a 32-bit kernel (kallsyms will fail).  

2. Once you hack around #1, you run into problems because the parisc64
compiler for some reason emits .dynsym/.dynamic sections into the
kernel. This confuses modutils to no end. There's a small patch in the
pa patch above that discards the dynamic sections. I'm dubious this is
the right thing to do, though it does build a kernel that will boot and
start kdb

3. After #1/#2, we run into a problem because hppa64 binutils doesn't
seem to sort unwind sections entirely correctly, so the backtracing
logic will fail.

I've only tested this on serial console. Virtual console probably
doesn't work yet (the pause key mapping code is missing). Also as
explained on the kdb mailing list the code only works with ps2 type
keyboards; someone will need to write a polling usb driver to use this
with a usb keyboard.

There is still much work to do... the unwind code in particular is quite
crude and could be much enhanced. please try out the patch and feel free
to send bug reports, patches, etc :-)

randolph
-- 
   @..@                                         http://www.TauSq.org/
  (----)
 ( >__< )
 ^^ ~~ ^^