From fdf3323f8a231e5f6ec1a3d25cb456af50cfe077 Mon Sep 17 00:00:00 2001 From: Mark Peek Date: Sat, 4 Jan 2003 20:17:31 +0000 Subject: Use DBREG_DRX instead of accessing the dr members directly. This make gdb build on i386 5.0 and backwards compatible with 4.X. --- devel/gdb53/files/patch-gdb_i386bsd-nat.c | 20 ++++++++++++++++++++ devel/gdb6/files/patch-gdb_i386bsd-nat.c | 20 ++++++++++++++++++++ devel/gdb6/files/patch-i386bsd-nat.c | 20 ++++++++++++++++++++ devel/gdb66/files/patch-gdb_i386bsd-nat.c | 20 ++++++++++++++++++++ devel/gdb66/files/patch-i386bsd-nat.c | 20 ++++++++++++++++++++ 5 files changed, 100 insertions(+) create mode 100644 devel/gdb53/files/patch-gdb_i386bsd-nat.c create mode 100644 devel/gdb6/files/patch-gdb_i386bsd-nat.c create mode 100644 devel/gdb6/files/patch-i386bsd-nat.c create mode 100644 devel/gdb66/files/patch-gdb_i386bsd-nat.c create mode 100644 devel/gdb66/files/patch-i386bsd-nat.c (limited to 'devel') diff --git a/devel/gdb53/files/patch-gdb_i386bsd-nat.c b/devel/gdb53/files/patch-gdb_i386bsd-nat.c new file mode 100644 index 000000000000..a28ce60b09e2 --- /dev/null +++ b/devel/gdb53/files/patch-gdb_i386bsd-nat.c @@ -0,0 +1,20 @@ +--- gdb/i386bsd-nat.c 2003/01/02 20:22:00 1.1 ++++ gdb/i386bsd-nat.c 2003/01/02 20:22:35 +@@ -306,7 +306,7 @@ + /* 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); ++ DBREG_DRX ((&dbregs), 7) = ~(0x0000fc00); + + DBREG_DRX ((&dbregs), regnum) = value; + +@@ -355,7 +355,7 @@ + return 0; + #endif + +- return dbregs.dr6; ++ return DBREG_DRX ((&dbregs), 6); + } + + #endif /* PT_GETDBREGS */ diff --git a/devel/gdb6/files/patch-gdb_i386bsd-nat.c b/devel/gdb6/files/patch-gdb_i386bsd-nat.c new file mode 100644 index 000000000000..a28ce60b09e2 --- /dev/null +++ b/devel/gdb6/files/patch-gdb_i386bsd-nat.c @@ -0,0 +1,20 @@ +--- gdb/i386bsd-nat.c 2003/01/02 20:22:00 1.1 ++++ gdb/i386bsd-nat.c 2003/01/02 20:22:35 +@@ -306,7 +306,7 @@ + /* 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); ++ DBREG_DRX ((&dbregs), 7) = ~(0x0000fc00); + + DBREG_DRX ((&dbregs), regnum) = value; + +@@ -355,7 +355,7 @@ + return 0; + #endif + +- return dbregs.dr6; ++ return DBREG_DRX ((&dbregs), 6); + } + + #endif /* PT_GETDBREGS */ diff --git a/devel/gdb6/files/patch-i386bsd-nat.c b/devel/gdb6/files/patch-i386bsd-nat.c new file mode 100644 index 000000000000..a28ce60b09e2 --- /dev/null +++ b/devel/gdb6/files/patch-i386bsd-nat.c @@ -0,0 +1,20 @@ +--- gdb/i386bsd-nat.c 2003/01/02 20:22:00 1.1 ++++ gdb/i386bsd-nat.c 2003/01/02 20:22:35 +@@ -306,7 +306,7 @@ + /* 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); ++ DBREG_DRX ((&dbregs), 7) = ~(0x0000fc00); + + DBREG_DRX ((&dbregs), regnum) = value; + +@@ -355,7 +355,7 @@ + return 0; + #endif + +- return dbregs.dr6; ++ return DBREG_DRX ((&dbregs), 6); + } + + #endif /* PT_GETDBREGS */ diff --git a/devel/gdb66/files/patch-gdb_i386bsd-nat.c b/devel/gdb66/files/patch-gdb_i386bsd-nat.c new file mode 100644 index 000000000000..a28ce60b09e2 --- /dev/null +++ b/devel/gdb66/files/patch-gdb_i386bsd-nat.c @@ -0,0 +1,20 @@ +--- gdb/i386bsd-nat.c 2003/01/02 20:22:00 1.1 ++++ gdb/i386bsd-nat.c 2003/01/02 20:22:35 +@@ -306,7 +306,7 @@ + /* 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); ++ DBREG_DRX ((&dbregs), 7) = ~(0x0000fc00); + + DBREG_DRX ((&dbregs), regnum) = value; + +@@ -355,7 +355,7 @@ + return 0; + #endif + +- return dbregs.dr6; ++ return DBREG_DRX ((&dbregs), 6); + } + + #endif /* PT_GETDBREGS */ diff --git a/devel/gdb66/files/patch-i386bsd-nat.c b/devel/gdb66/files/patch-i386bsd-nat.c new file mode 100644 index 000000000000..a28ce60b09e2 --- /dev/null +++ b/devel/gdb66/files/patch-i386bsd-nat.c @@ -0,0 +1,20 @@ +--- gdb/i386bsd-nat.c 2003/01/02 20:22:00 1.1 ++++ gdb/i386bsd-nat.c 2003/01/02 20:22:35 +@@ -306,7 +306,7 @@ + /* 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); ++ DBREG_DRX ((&dbregs), 7) = ~(0x0000fc00); + + DBREG_DRX ((&dbregs), regnum) = value; + +@@ -355,7 +355,7 @@ + return 0; + #endif + +- return dbregs.dr6; ++ return DBREG_DRX ((&dbregs), 6); + } + + #endif /* PT_GETDBREGS */ -- cgit v1.2.3