From 0afdd43759e75acf6c34338ac95d406aad497a08 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 31 Mar 2001 18:09:03 +0000 Subject: * i386bsd-nat.c: Include "gdb_assert.h". [HAVE_PT_GETDBREGS] (DBREG_DRX): Define if not already defined. [HAVE_PT_GETDBREGS] (i386bsd_dr_set, i386bsd_dr_set_control, i386bsd_dr_set_addr, i386bsd_dr_reset_addr, i386bsd_dr_get_status): New functions. * config/i386/nm-fbsd.h [HAVE_PT_GETDBREGS] (I386_USE_GENERIC_WATCHPOINTS): Define. Include "i386/nm-i386.h". (I386_DR_LOW_SET_CONTROL, I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR, I386_DR_LOW_GET_STATUS): New macros. (i386bsd_dr_set_control, i386bsd_dr_set_addr, i386bsd_dr_reset_addr, i386bsd_dr_get_status): New prototypes. * acconfig.h (HAVE_PT_GETDBREGS): New configure macro. * configure.in: Cleanup a few comments. Check for PT_GETDBREGS ptrace request. * config.in, configure: Regenerate. --- gdb/config/i386/nm-fbsd.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'gdb/config') diff --git a/gdb/config/i386/nm-fbsd.h b/gdb/config/i386/nm-fbsd.h index 02ea18b..79199bb 100644 --- a/gdb/config/i386/nm-fbsd.h +++ b/gdb/config/i386/nm-fbsd.h @@ -1,5 +1,5 @@ /* Native-dependent definitions for FreeBSD/i386. - Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1997, 2000 + Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -22,6 +22,31 @@ #ifndef NM_FBSD_H #define NM_FBSD_H +#ifdef HAVE_PT_GETDBREGS +#define I386_USE_GENERIC_WATCHPOINTS +#endif + +#include "i386/nm-i386.h" + +/* Provide access to the i386 hardware debugging registers. */ + +#define I386_DR_LOW_SET_CONTROL(control) \ + i386bsd_dr_set_control (control) +extern void i386bsd_dr_set_control (unsigned long control); + +#define I386_DR_LOW_SET_ADDR(regnum, addr) \ + i386bsd_dr_set_addr (regnum, addr) +extern void i386bsd_dr_set_addr (int regnum, CORE_ADDR addr); + +#define I386_DR_LOW_RESET_ADDR(regnum) \ + i386bsd_dr_reset_addr (regnum) +extern void i386bsd_dr_reset_addr (int regnum); + +#define I386_DR_LOW_GET_STATUS() \ + i386bsd_dr_get_status () +extern unsigned long i386bsd_dr_get_status (void); + + /* Type of the third argument to the `ptrace' system call. */ #define PTRACE_ARG3_TYPE caddr_t -- cgit v1.1