diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-08-19 23:18:03 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-08-19 23:18:03 +0000 |
commit | 522b996209a047fd15d45e2089ab07c332687501 (patch) | |
tree | 29cbe5ca922d49217311c10171075a976873eeef /gdb/delta68-nat.c | |
parent | 010877137c607e35f5c503a3563f1617c760492e (diff) | |
download | gdb-522b996209a047fd15d45e2089ab07c332687501.zip gdb-522b996209a047fd15d45e2089ab07c332687501.tar.gz gdb-522b996209a047fd15d45e2089ab07c332687501.tar.bz2 |
* config/m68k/delta68.m{t,h}: Use nm-delta68.h, etc. not
non-existent files nm-delta.h, etc.
* config/m68k/tm-delta68.h: Define CANNOT_STORE_REGISTER.
* delta68-nat.c: Add "[0]" in offsetof argument.
* delta68-nat.c (_initialize_kernel_u_addr): Don't try to set up
nl with initializer, just assign to it. Check n_scnum field on
return.
Diffstat (limited to 'gdb/delta68-nat.c')
-rw-r--r-- | gdb/delta68-nat.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/delta68-nat.c b/gdb/delta68-nat.c index e032a7d..d5d0049 100644 --- a/gdb/delta68-nat.c +++ b/gdb/delta68-nat.c @@ -43,7 +43,7 @@ register_addr (regno, blockend) if (regno >= 0 && regno < sizeof(sysv68reg) / sizeof(sysv68reg[0])) return blockend + sysv68reg[regno] * 4; else if (regno < FPC_REGNUM) - return offsetof (struct user, u_fpu.regs.reg[regno - FP0_REGNUM] + return offsetof (struct user, u_fpu.regs.reg[regno - FP0_REGNUM][0] else if (regno == FPC_REGNUM) return offsetof (struct user, u_fpu.regs.control); else if (regno == FPS_REGNUM) @@ -60,12 +60,15 @@ Internal error: invalid register number %d in REGISTER_U_ADDR\n", } CORE_ADDR kernel_u_addr; -static struct nlist nl[] = {{ "_u", -1, }, { (char *) 0, }}; /* Read the value of the u area from the kernel. */ void _initialize_kernel_u_addr () { - if (nlist ("/sysV68", nl) == 0) + stuct nlist nl[2]; + + nl[0].n_name = "u"; + nl[1].n_name = NULL; + if (nlist ("/sysV68", nl) == 0 && nl[0].n_scnum != 0) kernel_u_addr = nl[0].n_value; else { |