freebsd-ports/devel/gdb66/files/nm-fbsd.h
David E. O'Brien b6267d7a4b Update to the 2004-05-11 snapshot.
Also enable kgdb and thread support!
This is missing IA64 support, and the AMD64 kgdb support is hokey and needs
a few more bits filled in.
2004-05-13 04:28:38 +00:00

39 lines
1.1 KiB
C

#ifndef CONFIG_NM_FBSD_H
#define CONFIG_NM_FBSD_H
/* $FreeBSD$ */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
extern int kernel_debugging;
extern int kernel_writablecore;
CORE_ADDR fbsd_kern_frame_saved_pc(struct frame_info *frame);
#if __FreeBSD_version >= 500032
#define KGDB 1
#define ADDITIONAL_OPTIONS \
{"kernel", no_argument, &kernel_debugging, 1}, \
{"k", no_argument, &kernel_debugging, 1}, \
{"wcore", no_argument, &kernel_writablecore, 1}, \
{"w", no_argument, &kernel_writablecore, 1},
#define ADDITIONAL_OPTION_HELP \
"\
--kernel Enable kernel debugging.\n\
--wcore Make core file writable (only works for /dev/mem).\n\
This option only works while debugging a kernel !!\n\
"
#define DEFAULT_PROMPT kernel_debugging?"(kgdb) ":"(gdb) "
/* misuse START_PROGRESS to test whether we're running as kgdb */
/* START_PROGRESS is called at the top of main */
#undef START_PROGRESS
#define START_PROGRESS(STR,N) \
if (!strcmp (STR, "kgdb")) \
kernel_debugging = 1;
#endif
#endif /* CONFIG_NM_FBSD_H */