* lynx-nat.c (child_wait): Correct handling of byte reversed SPARC
Lynx wait status. (fetch_core_registers): Don't try to fetch a register if regmap maps it to -1. * sparc-tdep.c (sparc_frame_find_saved_regs): Use FRAME_SAVED_I0 and FRAME_SAVED_L0 when setting saved_regs_addr. SPARC Lynx stores the registers in a weird order. These patches make SPARC Lynx gdb usable, though it still has problems.
This commit is contained in:
parent
b255ccdb40
commit
60e86a677e
|
@ -1,3 +1,13 @@
|
|||
Tue Oct 11 15:51:01 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||
|
||||
* lynx-nat.c (child_wait): Correct handling of byte reversed SPARC
|
||||
Lynx wait status.
|
||||
(fetch_core_registers): Don't try to fetch a register if
|
||||
regmap maps it to -1.
|
||||
* sparc-tdep.c (sparc_frame_find_saved_regs): Use FRAME_SAVED_I0
|
||||
and FRAME_SAVED_L0 when setting saved_regs_addr. SPARC Lynx
|
||||
stores the registers in a weird order.
|
||||
|
||||
Sat Oct 8 20:59:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* blockframe.c (reinit_frame_cache): Reinstate select_frame call
|
||||
|
|
|
@ -606,10 +606,6 @@ child_wait (pid, ourstatus)
|
|||
set_sigint_trap(); /* Causes SIGINT to be passed on to the
|
||||
attached process. */
|
||||
pid = wait (&status);
|
||||
#ifdef SPARC
|
||||
/* Swap halves of status so that the rest of GDB can understand it */
|
||||
status.w_status = ((unsigned)status.w_status << 16) | ((unsigned)status.w_status >> 16);
|
||||
#endif
|
||||
|
||||
save_errno = errno;
|
||||
|
||||
|
@ -662,7 +658,31 @@ child_wait (pid, ourstatus)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef SPARC
|
||||
/* SPARC Lynx uses an byte reversed wait status; we must use the
|
||||
host macros to access it. These lines just a copy of
|
||||
store_waitstatus. We can't use CHILD_SPECIAL_WAITSTATUS
|
||||
because target.c can't include the Lynx <sys/wait.h>. */
|
||||
if (WIFEXITED (status))
|
||||
{
|
||||
ourstatus->kind = TARGET_WAITKIND_EXITED;
|
||||
ourstatus->value.integer = WEXITSTATUS (status);
|
||||
}
|
||||
else if (!WIFSTOPPED (status))
|
||||
{
|
||||
ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
|
||||
ourstatus->value.sig =
|
||||
target_signal_from_host (WTERMSIG (status));
|
||||
}
|
||||
else
|
||||
{
|
||||
ourstatus->kind = TARGET_WAITKIND_STOPPED;
|
||||
ourstatus->value.sig =
|
||||
target_signal_from_host (WSTOPSIG (status));
|
||||
}
|
||||
#else
|
||||
store_waitstatus (ourstatus, status.w_status);
|
||||
#endif
|
||||
|
||||
return pid;
|
||||
}
|
||||
|
@ -744,8 +764,9 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
|||
unsigned int regno;
|
||||
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
supply_register (regno, core_reg_sect + offsetof (st_t, ec)
|
||||
+ regmap[regno]);
|
||||
if (regmap[regno] != -1)
|
||||
supply_register (regno, core_reg_sect + offsetof (st_t, ec)
|
||||
+ regmap[regno]);
|
||||
|
||||
#ifdef SPARC
|
||||
/* Fetching this register causes all of the I & L regs to be read from the
|
||||
|
|
Loading…
Reference in New Issue