[xtensa-cvscommit] linux/arch/xtensa/mm init.c,1.1.1.1,1.2
Brought to you by:
zankel
|
From: <sfo...@us...> - 2002-09-19 07:06:15
|
Update of /cvsroot/xtensa/linux/arch/xtensa/mm
In directory usw-pr-cvs1:/tmp/cvs-serv975/arch/xtensa/mm
Modified Files:
init.c
Log Message:
First functional checkin of kgdb. Reading AR registers does not work yet. (Reading A registers works.)
Currently uses ttyS1 at 9600 8N1. Serial port and baud rate to become paramterized.
To use, must have CONFIGURE_KGDB. Must also pass the parameter "gdb" to the kernel to tell it to stop on boot and wait for a connection from gdb.
Index: init.c
===================================================================
RCS file: /cvsroot/xtensa/linux/arch/xtensa/mm/init.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** init.c 28 Aug 2002 16:10:14 -0000 1.1.1.1
--- init.c 19 Sep 2002 07:06:12 -0000 1.2
***************
*** 527,530 ****
--- 527,549 ----
datasize >> 10,
initsize >> 10);
+
+ /* We put the kgdb hook here, since we want it in arch-specific code, and after
+ * the console has been initialized. Doing this right after the IRQs are
+ * initialized would be ideal, but then the user wouldn't see the
+ * "Waiting for..." message on the console. */
+ #ifdef CONFIG_KGDB
+ extern int gdb_enter;
+ extern void breakpoint(void);
+ extern void set_debug_traps(void);
+ extern void rs_kgdb_hook(int);
+ if (gdb_enter) {
+ rs_kgdb_hook(1);
+ set_debug_traps();
+ printk("Waiting for connection from remote gdb... \n");
+ breakpoint();
+ }
+ #endif
+
+
}
|