From 1cdc4d3dd3997f7f78a4a0ff9c52006837b0b5c4 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 21 Oct 2002 05:33:05 +0000 Subject: Track changed definition of the debug registers. Sorry for missing this the first time. --- contrib/gdb/gdb/i386bsd-nat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/gdb/gdb/i386bsd-nat.c b/contrib/gdb/gdb/i386bsd-nat.c index 5d35830..9cf80f0 100644 --- a/contrib/gdb/gdb/i386bsd-nat.c +++ b/contrib/gdb/gdb/i386bsd-nat.c @@ -18,6 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $FreeBSD$ */ + #include "defs.h" #include "inferior.h" #include "regcache.h" @@ -305,7 +307,7 @@ i386bsd_dr_set (int regnum, unsigned int value) /* For some mysterious reason, some of the reserved bits in the debug control register get set. Mask these off, otherwise the ptrace call below will fail. */ - dbregs.dr7 &= ~(0x0000fc00); + dbregs.dr[7] &= ~(0x0000fc00); DBREG_DRX ((&dbregs), regnum) = value; @@ -354,7 +356,7 @@ i386bsd_dr_get_status (void) return 0; #endif - return dbregs.dr6; + return dbregs.dr[6]; } #endif /* PT_GETDBREGS */ -- cgit v1.1