blob: 1a581cf76d05fb32614d2994a115cb8d930fc5f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-ag,v 1.1 2005/04/12 10:13:36 shannonjr Exp $
--- gdb/i386bsd-nat.c.orig 2003-01-16 02:46:34.000000000 -0700
+++ gdb/i386bsd-nat.c
@@ -150,6 +150,9 @@ fill_gregset (gregset_t *gregsetp, int r
}
#include "i387-tdep.h"
+#ifdef HAVE_SYS_PROCFS_H
+#include <sys/procfs.h>
+#endif
/* Fill GDB's register array with the floating-point register values
in *FPREGSETP. */
@@ -419,7 +422,7 @@ _initialize_i386bsd_nat (void)
/* Override the default value for the offset of the program counter
in the sigcontext structure. */
- sc_pc_offset = offsetof (struct sigcontext, sc_pc);
+ sc_pc_offset = offsetof (ucontext_t, uc_mcontext.__gregs[_REG_EIP]);
if (SC_PC_OFFSET != sc_pc_offset)
{
@@ -432,7 +435,7 @@ Please report this to <bug-gdb@gnu.org>.
SC_PC_OFFSET = sc_pc_offset;
/* Likewise for the stack pointer. */
- sc_sp_offset = offsetof (struct sigcontext, sc_sp);
+ sc_pc_offset = offsetof (ucontext_t, uc_mcontext.__gregs[_REG_UESP]);
if (SC_SP_OFFSET != sc_sp_offset)
{
|