On Wed, 4 Dec 2002 01:45:12 +0800 , 
"Dong, Edie" <[EMAIL PROTECTED]> wrote:
>             I am planning to add Xscale architecture support for KDB, I
>want to fully use the XScale HW debug unit to enable the instruction break
>point and data breakpoint as well as the trace buffer enabling. Of course I
>am going to make it have limited feature support for ARMV4 architecture
>system.
>             Does any body have any suggestion or comments? Or is there
>anybody already devoted to this area? 

The latest kdb patches for IA64 are the best starting point, the ix86
patch is more intrusive.  ftp://oss.sgi.com/projects/kdb/download/v2.5/
kdb-v2.5-2.4.19-common-1 and kdb-v2.5-2.4.19-ia64-020821-1.  You will
need a kdb-v2.5-2.4.19-arm-1 patch containing patches against these
areas.

include/asm-$(ARCH):
  kdb.h
    Define KDB_ENTER() and various _fmt strings.
  kdbprivate.h
    Replace everything.  Long jump support is the hardest, you can
    start with #undef KDB_HAVE_LONGJMP and add long jump later.  It is
    used for breaking out of long output and recovery from kdb internal
    errors, such as accessing invalid addresses.

arch/$(ARCH):
  kernel/traps.c
    Hook into die_if_kernel(), debug handlers etc.  Also NMI if supported.
  kernel/smp.c
    KDB uses IPI or the equivalent to interrupt other processors.  If
    the IPI can be sent unmaskable, do so.
  config.in, Makefile
    Add kdb options.
  kdb/*.[ch]
    All the arch dependent code needs to be reworked.  Ignore
    kdba_prologue() for now, IA64 did not fit the prologue framework
    which is why the code has lots of FIXME comments.

    kdba_bt decodes the calling sequence.  Unwinding the calling frame
    is tricky, especially when the kernel uses out of line sections for
    locks.  IA64 uses unwind data, ix86 has heuristics based on the way
    that gcc generates code.

    kdba_bp implements hardware and software breakpoints.

    kdba_io has to do IO without using interrupts, kdb disables all
    interrupts on all cpus.

    kdba_id handles the high level disassembler work.  Most of the work
    is done by the code extracted from gdb.

    A large chunk of arch/$(ARCH)/kdb is the dissassembler code lifted
    from gdb and modified as little as possible to fit the kernel.


Reply via email to