Date: Sun, 30 May 2004 15:55:14 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 53820 for review Message-ID: <200405302255.i4UMtEPc001085@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=53820 Change 53820 by marcel@marcel_nfs on 2004/05/30 15:54:16 Make DDB conditional code dependent upon KDB or GDB where appropriate. Remove unneeded DDB specific includes. Affected files ... .. //depot/projects/gdb/sys/kern/kern_clock.c#7 edit .. //depot/projects/gdb/sys/kern/kern_synch.c#10 edit .. //depot/projects/gdb/sys/kern/link_elf.c#4 edit .. //depot/projects/gdb/sys/kern/sched_ule.c#10 edit .. //depot/projects/gdb/sys/kern/subr_witness.c#7 edit Differences ... ==== //depot/projects/gdb/sys/kern/kern_clock.c#7 (text+ko) ==== @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD: src/sys/kern/kern_clock.c,v 1.168 2004/05/03 00:48:11 cperciva Exp $"); #include "opt_ntp.h" -#include "opt_ddb.h" #include "opt_watchdog.h" #include <sys/param.h> @@ -70,10 +69,6 @@ #include <sys/gmon.h> #endif -#ifdef DDB -#include <ddb/ddb.h> -#endif - #ifdef DEVICE_POLLING extern void hardclock_device_poll(void); #endif /* DEVICE_POLLING */ ==== //depot/projects/gdb/sys/kern/kern_synch.c#10 (text+ko) ==== @@ -37,7 +37,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.248 2004/05/14 20:51:42 bde Exp $"); -#include "opt_ddb.h" #include "opt_ktrace.h" #include <sys/param.h> @@ -58,9 +57,6 @@ #include <sys/sysctl.h> #include <sys/sysproto.h> #include <sys/vmmeter.h> -#ifdef DDB -#include <ddb/ddb.h> -#endif #ifdef KTRACE #include <sys/uio.h> #include <sys/ktrace.h> ==== //depot/projects/gdb/sys/kern/link_elf.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD: src/sys/kern/link_elf.c,v 1.78 2004/05/19 14:36:38 bde Exp $"); -#include "opt_ddb.h" +#include "opt_gdb.h" #include "opt_mac.h" #include <sys/param.h> @@ -94,7 +94,7 @@ long ddbstrcnt; /* number of bytes in string table */ caddr_t symbase; /* malloc'ed symbold base */ caddr_t strbase; /* malloc'ed string base */ -#ifdef DDB +#ifdef GDB struct link_map gdb; /* hooks for gdb */ #endif } *elf_file_t; @@ -146,7 +146,7 @@ static int relocate_file(elf_file_t ef); static int link_elf_preload_parse_symbols(elf_file_t ef); -#ifdef DDB +#ifdef GDB static void r_debug_state(struct r_debug *dummy_one, struct link_map *dummy_two); @@ -199,7 +199,7 @@ l->l_next->l_prev = l->l_prev; } } -#endif /* DDB */ +#endif /* GDB */ #ifdef __ia64__ Elf_Addr link_elf_get_gp(linker_file_t); @@ -223,7 +223,7 @@ static int link_elf_link_common_finish(linker_file_t lf) { -#ifdef DDB +#ifdef GDB elf_file_t ef = (elf_file_t)lf; char *newfilename; #endif @@ -234,7 +234,7 @@ if (error) return (error); -#ifdef DDB +#ifdef GDB GDB_STATE(RT_ADD); ef->gdb.l_addr = lf->address; newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, M_WAITOK); @@ -295,7 +295,7 @@ } (void)link_elf_preload_parse_symbols(ef); -#ifdef DDB +#ifdef GDB r_debug.r_map = NULL; r_debug.r_brk = r_debug_state; r_debug.r_state = RT_CONSISTENT; @@ -423,7 +423,7 @@ if (plttype != DT_REL && plttype != DT_RELA) return ENOEXEC; break; -#ifdef DDB +#ifdef GDB case DT_DEBUG: dp->d_un.d_ptr = (Elf_Addr) &r_debug; break; @@ -862,7 +862,7 @@ { elf_file_t ef = (elf_file_t) file; -#ifdef DDB +#ifdef GDB if (ef->gdb.l_ld) { GDB_STATE(RT_DELETE); free((void *)(uintptr_t)ef->gdb.l_name, M_LINKER); ==== //depot/projects/gdb/sys/kern/sched_ule.c#10 (text+ko) ==== @@ -43,9 +43,6 @@ #include <sys/sysctl.h> #include <sys/sysproto.h> #include <sys/vmmeter.h> -#ifdef DDB -#include <ddb/ddb.h> -#endif #ifdef KTRACE #include <sys/uio.h> #include <sys/ktrace.h> ==== //depot/projects/gdb/sys/kern/subr_witness.c#7 (text+ko) ==== @@ -715,7 +715,7 @@ printf(" 1st %s @ %s:%d\n", lock1->li_lock->lo_name, lock1->li_file, lock1->li_line); printf(" 2nd %s @ %s:%d\n", lock->lo_name, file, line); -#ifdef DDB +#ifdef KDB goto debugger; #else return; @@ -846,7 +846,7 @@ printf(" 3rd %p %s (%s) @ %s:%d\n", lock, lock->lo_name, lock->lo_type, file, line); } -#ifdef DDB +#ifdef KDB goto debugger; #else return;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405302255.i4UMtEPc001085>