Date: Mon, 5 Jul 2004 21:03:20 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 56539 for review Message-ID: <200407052103.i65L3Kt1090176@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=56539 Change 56539 by marcel@marcel_nfs on 2004/07/05 21:03:10 Add makectx(struct trapframe *, struct pcb *) and call it from kdb_trap() to create a suitable context from the frame. With this function the thread that entered the debugger will have the faulting function as the context. This is better than calling savectx() in kdb_trap. This should be the last of work required to have the debugger framework operate on the PCB instead of the trapframe. Since I haven't implemented this function anywhere, nothing links ATM. It may be the last, it's surely not the least... Affected files ... .. //depot/projects/gdb/sys/alpha/include/pcb.h#2 edit .. //depot/projects/gdb/sys/amd64/include/pcb.h#5 edit .. //depot/projects/gdb/sys/i386/include/pcb.h#3 edit .. //depot/projects/gdb/sys/ia64/include/pcb.h#2 edit .. //depot/projects/gdb/sys/kern/subr_kdb.c#16 edit .. //depot/projects/gdb/sys/sparc64/include/pcb.h#2 edit Differences ... ==== //depot/projects/gdb/sys/alpha/include/pcb.h#2 (text+ko) ==== @@ -58,6 +58,7 @@ }; #ifdef _KERNEL +void makectx(struct trapframe *, struct pcb *); void savectx(struct pcb *); #endif ==== //depot/projects/gdb/sys/amd64/include/pcb.h#5 (text+ko) ==== @@ -78,6 +78,9 @@ }; #ifdef _KERNEL +struct trapframe; + +void makectx(struct trapframe *, struct pcb *); void savectx(struct pcb *); #endif ==== //depot/projects/gdb/sys/i386/include/pcb.h#3 (text+ko) ==== @@ -74,6 +74,9 @@ }; #ifdef _KERNEL +struct trapframe; + +void makectx(struct trapframe *, struct pcb *); void savectx(struct pcb *); #endif ==== //depot/projects/gdb/sys/ia64/include/pcb.h#2 (text+ko) ==== @@ -59,6 +59,10 @@ #ifdef _KERNEL #define savectx(p) swapctx(p, NULL) + +struct trapframe; + +void makectx(struct trapframe *, struct pcb *); void restorectx(struct pcb *) __dead2; int swapctx(struct pcb *old, struct pcb *new); ==== //depot/projects/gdb/sys/kern/subr_kdb.c#16 (text+ko) ==== @@ -355,7 +355,7 @@ if (kdb_active) return (0); - savectx(&kdb_pcb); + makectx(tf, &kdb_pcb); critical_enter(); ==== //depot/projects/gdb/sys/sparc64/include/pcb.h#2 (text+ko) ==== @@ -49,6 +49,7 @@ } __aligned(64); #ifdef _KERNEL +void makectx(struct trapframe *, struct pcb *); int savectx(struct pcb *pcb); #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407052103.i65L3Kt1090176>