PERFORCE change 49382 for review

Marcel Moolenaar marcel at FreeBSD.org
Sat Mar 20 11:06:49 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=49382

Change 49382 by marcel at marcel_nfs on 2004/03/20 11:05:48

	Desupport dbbe_enter(). All debugger entries happen through
	dbbe_trap(). That way we can deal with SMP in a single place.
	I think I added dbbe_enter() as a way to avoid the trap, but
	the backend has to construct a context (i.e. a trapframe)
	manually in that case. That's just stupid...

Affected files ...

.. //depot/projects/gdb/sys/gdb/gdb_main.c#6 edit
.. //depot/projects/gdb/sys/kern/subr_kdb.c#5 edit
.. //depot/projects/gdb/sys/sys/kdb.h#4 edit

Differences ...

==== //depot/projects/gdb/sys/gdb/gdb_main.c#6 (text+ko) ====

@@ -43,7 +43,7 @@
 static dbbe_init_f gdb_init;
 static dbbe_trap_f gdb_trap;
 
-KDB_BACKEND(gdb, gdb_init, NULL, NULL, gdb_trap);
+KDB_BACKEND(gdb, gdb_init, NULL, gdb_trap);
 
 GDB_DBGPORT(null, NULL, NULL, NULL, NULL, NULL, NULL);
 SET_DECLARE(gdb_dbgport_set, struct gdb_dbgport);

==== //depot/projects/gdb/sys/kern/subr_kdb.c#5 (text+ko) ====

@@ -35,7 +35,7 @@
 int kdb_active = 0;
 struct kdb_dbbe *kdb_cur = NULL;
 
-KDB_BACKEND(null, NULL, NULL, NULL, NULL);
+KDB_BACKEND(null, NULL, NULL, NULL);
 SET_DECLARE(kdb_dbbe_set, struct kdb_dbbe);
 
 /*
@@ -108,12 +108,7 @@
 	if (kdb_cur != NULL) {
 		if (msg != NULL)
 			printf("KDB: enter: %s\n", msg);
-		if (kdb_cur->dbbe_enter != NULL) {
-			kdb_active = 1;
-			kdb_cur->dbbe_enter();
-			kdb_active = 0;
-		} else
-			breakpoint();
+		breakpoint();
 	}
 }
 

==== //depot/projects/gdb/sys/sys/kdb.h#4 (text+ko) ====

@@ -31,24 +31,21 @@
 
 struct trapframe;
 
-typedef void dbbe_enter_f(void);
 typedef int dbbe_init_f(void);
 typedef void dbbe_trace_f(void);
 typedef int dbbe_trap_f(int, int, struct trapframe *);
 
 struct kdb_dbbe {
 	const char	*dbbe_name;
-	dbbe_enter_f	*dbbe_enter;
 	dbbe_init_f	*dbbe_init;
 	dbbe_trace_f	*dbbe_trace;
 	dbbe_trap_f	*dbbe_trap;
 	int		dbbe_active;
 };
 
-#define	KDB_BACKEND(name, init, trace, enter, trap)	\
+#define	KDB_BACKEND(name, init, trace, trap)		\
 	static struct kdb_dbbe name##_dbbe = {		\
 		.dbbe_name = #name,			\
-		.dbbe_enter = enter,			\
 		.dbbe_init = init,			\
 		.dbbe_trace = trace,			\
 		.dbbe_trap = trap			\


More information about the p4-projects mailing list