2 #include <sys/signal.h> /* for MAXSIG in sys/user.h */
3 #include <sys/types.h> /* for ushort in sys/dir.h */
4 #include <sys/dir.h> /* for struct direct in sys/user.h */
9 #if !defined (offsetof)
10 #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
13 /* Return the address in the core dump or inferior of register REGNO.
14 BLOCKEND is the address of the end of the user structure. */
17 register_addr (regno
, blockend
)
21 static int sysv68reg
[] =
22 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 15, 16 };
24 if (regno
>= 0 && regno
< sizeof(sysv68reg
) / sizeof(sysv68reg
[0]))
25 return blockend
+ sysv68reg
[regno
] * 4;
26 else if (regno
< FPC_REGNUM
)
27 return offsetof (struct user
, u_fpu
.regs
.reg
[regno
- FP0_REGNUM
]
28 else if (regno
== FPC_REGNUM
)
29 return offsetof (struct user
, u_fpu
.regs
.control
);
30 else if (regno
== FPS_REGNUM
)
31 return offsetof (struct user
, u_fpu
.regs
.status
);
32 else if (regno
== FPI_REGNUM
)
33 return offsetof (struct user
, u_fpu
.regs
.iaddr
);
37 Internal error: invalid register number %d in REGISTER_U_ADDR\n",
43 CORE_ADDR kernel_u_addr
;
44 static struct nlist nl
[] = {{ "_u", -1, }, { (char *) 0, }};
46 /* Read the value of the u area from the kernel. */
47 void _initialize_kernel_u_addr ()
49 if (nlist ("/sysV68", nl
) == 0)
50 kernel_u_addr
= nl
[0].n_value
;
53 perror ("Cannot get kernel u area address");
This page took 0.029943 seconds and 4 git commands to generate.