aboutsummaryrefslogtreecommitdiff
path: root/gdb/lynx-nat.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-01-22 08:42:14 +0000
committerStu Grossman <grossman@cygnus>1994-01-22 08:42:14 +0000
commit8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618 (patch)
tree5d10d81cb709c41c0ccf505098dfecf6d1e8bb95 /gdb/lynx-nat.c
parenteae821453c15f5990eecdaae1f16642baa0c11fb (diff)
downloadgdb-8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618.zip
gdb-8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618.tar.gz
gdb-8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618.tar.bz2
* sparc-tdep.c, lynx-nat.c, config/sparc/tm-sparc.h,
config/sparc/tm-sparclynx.h: Move defs of FRAME_SAVED_I0/L0 to tm-sparc.h so they can be overridden if necessary.
Diffstat (limited to 'gdb/lynx-nat.c')
-rw-r--r--gdb/lynx-nat.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 4510972..66e0d25 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -235,14 +235,14 @@ fetch_inferior_registers (regno)
sp = read_register (SP_REGNUM);
- target_xfer_memory (sp, &registers[REGISTER_BYTE(I0_REGNUM)],
+ target_xfer_memory (sp + FRAME_SAVED_I0,
+ &registers[REGISTER_BYTE(I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM), 0);
for (i = I0_REGNUM; i <= I7_REGNUM; i++)
register_valid[i] = 1;
- sp += 8 * REGISTER_RAW_SIZE (I0_REGNUM);
-
- target_xfer_memory (sp, &registers[REGISTER_BYTE(L0_REGNUM)],
+ target_xfer_memory (sp + FRAME_SAVED_L0,
+ &registers[REGISTER_BYTE(L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM), 0);
for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
register_valid[i] = 1;
@@ -329,10 +329,12 @@ store_inferior_registers (regno)
{
if (!register_valid[L0_REGNUM+5])
abort();
- target_xfer_memory (sp, &registers[REGISTER_BYTE (I0_REGNUM)],
+ target_xfer_memory (sp + FRAME_SAVED_I0,
+ &registers[REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM), 1);
- sp += 8 * REGISTER_RAW_SIZE (I0_REGNUM);
- target_xfer_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+
+ target_xfer_memory (sp + FRAME_SAVED_L0,
+ &registers[REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM), 1);
}
else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
@@ -341,9 +343,10 @@ store_inferior_registers (regno)
abort();
if (regno >= L0_REGNUM && regno <= L0_REGNUM + 7)
regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM)
- + 8 * REGISTER_RAW_SIZE (I0_REGNUM);
+ + FRAME_SAVED_L0;
else
- regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM);
+ regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM)
+ + FRAME_SAVED_I0;
target_xfer_memory (sp + regoffset, &registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno), 1);
}