Fix for 4xx KGDB continue command
From: Frank Rowand <hidden>
Date: 2001-12-04 02:20:48
Tom,
Can you apply the attached patch to fix problems with the 4xx
KGDB continue command in the 2_4_devel tree?
The symptom is that in some cases to continue from a breakpoint
the continue command has to be issued twice. This can be seen
by: 1) set a breakpoint at sys_sync, 2) type "sync" on the console,
3) type "c" in KGDB -- KGDB will return to the sys_sync breakpoint
instead of continueing, 4) type "c" in KGDB -- KGDB will continue
properly and the console prompt will be printed on the console.
The major change was to always use the Program exception to handle
KGDB trap instructions and to clean up the Program exception code path.
Files modified in the patch:
arch/ppc/config.in
- fix the if that allows CONFIG_COMPILE_OPTIONS to be set
arch/ppc/kernel/head_4xx.S
- update comments
- read value of SPRN_SRR3 before clearing the MSR_DE bit in
it
arch/ppc/kernel/ppc-stub.c
- Increase the coverage of the "kdebug" support to show the
communications protocol involved in continue and single step
(all other commands were already covered).
- Don't use the debug exception for the 4xx continue command.
- For 4xx single step include IDM in the value put in DBCR0,
don't set the (non-existent) MSR_SE bit, and properly restore msr.
arch/ppc/kernel/ppc4xx_kgdb.c
- remove call to ppc4xx_kgdb_init()
arch/ppc/kernel/ppc4xx_setup.c
- remove ppc4xx_kgdb_init() (no longer needed since debug exception
is not used for trap instruction).
- rename ppc4xx_gdb_init() to ppc4xx_bdi_init() to better reflect
its purpose.
arch/ppc/kernel/traps.c
- For 4xx Program exception, clear bit that indicates a trap
instruction occurred.
Thanks!
Frank
--
Frank Rowand [off-list ref]
MontaVista Software, Inc Attachments
- patch_kgdb_1.731 [text/plain] 6700 bytes · preview