mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Use DBREG_DRX instead of accessing the dr members directly. This make gdb
build on i386 5.0 and backwards compatible with 4.X.
This commit is contained in:
parent
e3dcd1395f
commit
fdf3323f8a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=72529
5 changed files with 100 additions and 0 deletions
20
devel/gdb53/files/patch-gdb_i386bsd-nat.c
Normal file
20
devel/gdb53/files/patch-gdb_i386bsd-nat.c
Normal file
|
@ -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 */
|
20
devel/gdb6/files/patch-gdb_i386bsd-nat.c
Normal file
20
devel/gdb6/files/patch-gdb_i386bsd-nat.c
Normal file
|
@ -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 */
|
20
devel/gdb6/files/patch-i386bsd-nat.c
Normal file
20
devel/gdb6/files/patch-i386bsd-nat.c
Normal file
|
@ -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 */
|
20
devel/gdb66/files/patch-gdb_i386bsd-nat.c
Normal file
20
devel/gdb66/files/patch-gdb_i386bsd-nat.c
Normal file
|
@ -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 */
|
20
devel/gdb66/files/patch-i386bsd-nat.c
Normal file
20
devel/gdb66/files/patch-i386bsd-nat.c
Normal file
|
@ -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 */
|
Loading…
Add table
Reference in a new issue