aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-nindy.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1996-04-13 21:33:59 +0000
committerStu Grossman <grossman@cygnus>1996-04-13 21:33:59 +0000
commit449abd890017f4db4e9842a492e5be44610ecfaa (patch)
tree493484d6e0d941a2a50f343575ca4591f893b05c /gdb/remote-nindy.c
parent9898b3b7c77ed601f60977ea2a7715cfcf17f4ec (diff)
downloadgdb-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.c28
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 (&registers[REGISTER_BYTE (PCW_REGNUM)], nindy_regs.pcw_acw, 2*4);
memcpy (&registers[REGISTER_BYTE (IP_REGNUM)], nindy_regs.ip, 1*4);
memcpy (&registers[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,
- &registers[REGISTER_BYTE (regnum)]);
- }
+ memcpy (&registers[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, &registers[REGISTER_BYTE (R0_REGNUM)], 16*4);
memcpy (nindy_regs.global_regs, &registers[REGISTER_BYTE (G0_REGNUM)], 16*4);
memcpy (nindy_regs.pcw_acw, &registers[REGISTER_BYTE (PCW_REGNUM)], 2*4);
memcpy (nindy_regs.ip, &registers[REGISTER_BYTE (IP_REGNUM)], 1*4);
memcpy (nindy_regs.tcw, &registers[REGISTER_BYTE (TCW_REGNUM)], 1*4);
- for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 4; regnum++)
- {
- FLOATFORMAT_TO_DOUBLEST (&floatformat_i960_ext,
- &registers[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, &registers[REGISTER_BYTE (FP0_REGNUM)], 8*4);
immediate_quit++;
ninRegsPut( (char *) &nindy_regs );