diff options
author | Stu Grossman <grossman@cygnus> | 1996-04-13 21:33:59 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1996-04-13 21:33:59 +0000 |
commit | 449abd890017f4db4e9842a492e5be44610ecfaa (patch) | |
tree | 493484d6e0d941a2a50f343575ca4591f893b05c /gdb/remote-nindy.c | |
parent | 9898b3b7c77ed601f60977ea2a7715cfcf17f4ec (diff) | |
download | gdb-449abd890017f4db4e9842a492e5be44610ecfaa.zip gdb-449abd890017f4db4e9842a492e5be44610ecfaa.tar.gz gdb-449abd890017f4db4e9842a492e5be44610ecfaa.tar.bz2 |
* remote-nindy.c (nindy_open): Acquire more target state so that
user can attach to a previously running program.
* (nindy_fetch_registers nindy_store_registers): Get rid of fp
conversion code. That's all handled in {extract store}_floating
now.
* utils.c (floatformat_to_double): Don't bias exponent when
handling zero's, denorms or NaNs.
* config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
REGISTER_CONVERT_TO_RAW): Change to using DOUBLST and
FLOATFORMAT_TO/FROM_DOUBLEST macros.
* config/i960/tm-nindy960.h: Undefine
REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, and
REGISTER_CONVERTIBLE. These are no longer necessary now that all
the magic happens in extract/store_floating.
Diffstat (limited to 'gdb/remote-nindy.c')
-rw-r--r-- | gdb/remote-nindy.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c index 29e5923..416adc1 100644 --- a/gdb/remote-nindy.c +++ b/gdb/remote-nindy.c @@ -211,7 +211,13 @@ nindy_open (name, from_tty) savename = savestring (name, strlen (name)); push_target (&nindy_ops); + target_fetch_registers(-1); + + init_thread_list (); + init_wait_for_inferior (); + clear_proceed_status (); + normal_stop (); } /* User-initiated quit of nindy operations. */ @@ -437,8 +443,7 @@ nindy_fetch_registers(regno) int regno; { struct nindy_regs nindy_regs; - int regnum, inv; - double dub; + int regnum; immediate_quit++; ninRegsGet( (char *) &nindy_regs ); @@ -449,14 +454,7 @@ nindy_fetch_registers(regno) memcpy (®isters[REGISTER_BYTE (PCW_REGNUM)], nindy_regs.pcw_acw, 2*4); memcpy (®isters[REGISTER_BYTE (IP_REGNUM)], nindy_regs.ip, 1*4); memcpy (®isters[REGISTER_BYTE (TCW_REGNUM)], nindy_regs.tcw, 1*4); - for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 4; regnum++) { - dub = unpack_double (builtin_type_double, - &nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)], - &inv); - /* dub now in host byte order */ - FLOATFORMAT_FROM_DOUBLEST (&floatformat_i960_ext, &dub, - ®isters[REGISTER_BYTE (regnum)]); - } + memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], nindy_regs.fp_as_double, 4 * 8); registers_fetched (); } @@ -474,21 +472,13 @@ nindy_store_registers(regno) { struct nindy_regs nindy_regs; int regnum; - double dub; memcpy (nindy_regs.local_regs, ®isters[REGISTER_BYTE (R0_REGNUM)], 16*4); memcpy (nindy_regs.global_regs, ®isters[REGISTER_BYTE (G0_REGNUM)], 16*4); memcpy (nindy_regs.pcw_acw, ®isters[REGISTER_BYTE (PCW_REGNUM)], 2*4); memcpy (nindy_regs.ip, ®isters[REGISTER_BYTE (IP_REGNUM)], 1*4); memcpy (nindy_regs.tcw, ®isters[REGISTER_BYTE (TCW_REGNUM)], 1*4); - for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 4; regnum++) - { - FLOATFORMAT_TO_DOUBLEST (&floatformat_i960_ext, - ®isters[REGISTER_BYTE (regnum)], &dub); - store_floating (&nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)], - REGISTER_VIRTUAL_SIZE (regnum), - dub); - } + memcpy (nindy_regs.fp_as_double, ®isters[REGISTER_BYTE (FP0_REGNUM)], 8*4); immediate_quit++; ninRegsPut( (char *) &nindy_regs ); |