Date: Tue, 23 Mar 2004 18:07:28 -0800 (PST) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 49604 for review Message-ID: <200403240207.i2O27SNe098577@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=49604 Change 49604 by marcel@marcel_nfs on 2004/03/23 18:06:48 s/kdb_cur/kdb_dbbe/g This reduces confusion when the notion of current is used in the context of threads. Affected files ... .. //depot/projects/gdb/sys/kern/subr_kdb.c#7 edit .. //depot/projects/gdb/sys/sys/kdb.h#5 edit Differences ... ==== //depot/projects/gdb/sys/kern/subr_kdb.c#7 (text+ko) ==== @@ -35,7 +35,7 @@ #include <sys/smp.h> int kdb_active = 0; -struct kdb_dbbe *kdb_cur = NULL; +struct kdb_dbbe *kdb_dbbe = NULL; KDB_BACKEND(null, NULL, NULL, NULL); SET_DECLARE(kdb_dbbe_set, struct kdb_dbbe); @@ -90,9 +90,9 @@ kdb_backtrace() { - if (kdb_cur != NULL && kdb_cur->dbbe_trace != NULL) { + if (kdb_dbbe != NULL && kdb_dbbe->dbbe_trace != NULL) { printf("KDB: stack backtrace:\n"); - kdb_cur->dbbe_trace(); + kdb_dbbe->dbbe_trace(); } } @@ -107,7 +107,7 @@ kdb_enter(const char *msg) { - if (kdb_cur != NULL) { + if (kdb_dbbe != NULL) { if (msg != NULL) printf("KDB: enter: %s\n", msg); breakpoint(); @@ -125,7 +125,7 @@ int cur_pri, pri; kdb_active = 0; - kdb_cur = NULL; + kdb_dbbe = NULL; cur_pri = -1; SET_FOREACH(iter, kdb_dbbe_set) { be = *iter; @@ -133,10 +133,10 @@ be->dbbe_active = (pri >= 0) ? 0 : -1; if (pri > cur_pri) { cur_pri = pri; - kdb_cur = be; + kdb_dbbe = be; } } - if (kdb_cur != NULL) { + if (kdb_dbbe != NULL) { printf("KDB: debugger backends:"); SET_FOREACH(iter, kdb_dbbe_set) { be = *iter; @@ -145,7 +145,7 @@ } printf("\n"); printf("KDB: current backend: %s\n", - kdb_cur->dbbe_name); + kdb_dbbe->dbbe_name); } } @@ -158,7 +158,7 @@ { int handled; - if (kdb_cur == NULL || kdb_cur->dbbe_trap == NULL) + if (kdb_dbbe == NULL || kdb_dbbe->dbbe_trap == NULL) return (0); critical_enter(); @@ -168,7 +168,7 @@ #endif kdb_active++; - handled = kdb_cur->dbbe_trap(type, code, tf); + handled = kdb_dbbe->dbbe_trap(type, code, tf); kdb_active--; #ifdef SMP ==== //depot/projects/gdb/sys/sys/kdb.h#5 (text+ko) ==== @@ -53,7 +53,7 @@ DATA_SET(kdb_dbbe_set, name##_dbbe) extern int kdb_active; /* Non-zero while in debugger. */ -extern struct kdb_dbbe *kdb_cur; /* Default debugger backend or NULL. */ +extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */ int kdb_alt_break(int, int *); void kdb_backtrace(void);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403240207.i2O27SNe098577>