aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1997-04-04 16:52:55 +0000
committerStu Grossman <grossman@cygnus>1997-04-04 16:52:55 +0000
commit0a325463ed934263d3a6902c38e898c6b38e9915 (patch)
tree7dbdf840c857d12eef40703b184f73f3cbf81d9e /gdb/sh-tdep.c
parentab83171da508abaae554b4ff5cdf4dfcc96f0a25 (diff)
downloadgdb-0a325463ed934263d3a6902c38e898c6b38e9915.zip
gdb-0a325463ed934263d3a6902c38e898c6b38e9915.tar.gz
gdb-0a325463ed934263d3a6902c38e898c6b38e9915.tar.bz2
* remote.c: Fix doc for `C' and `S' commands to indicate full
address. * (remote_ops extended_remote_ops remote_desc remote_write_size): Make static. * (remote_fetch_registers remote_write_bytes remote_read_bytes): Record size of response to fetch registers command, use this to limit size of memory read and write commands. * (push_remote_target): New function to make it possible to have another target switch to the remote target. * target.h: Add prototype for push_remote_target. * sh-tdep.c (sh_frame_find_saved_regs): Fix sign extension bugs for hosts which default to unsigned chars (such as SGI's). * (_initialize_sh_tdep): Don't set remote_write_size. It's now handled automatically in remote.c.
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 4a3eb2e..dcec846 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -262,7 +262,7 @@ sh_frame_find_saved_regs (fi, fsr)
}
else if (IS_MOV_R3 (insn))
{
- r3_val = (char) (insn & 0xff);
+ r3_val = ((insn & 0xff) ^ 0x80) - 0x80;
pc += 2;
insn = read_memory_integer (pc, 2);
}
@@ -281,7 +281,7 @@ sh_frame_find_saved_regs (fi, fsr)
else if (IS_ADD_SP (insn))
{
pc += 2;
- depth += -((char) (insn & 0xff));
+ depth -= ((insn & 0xff) ^ 0x80) - 0x80;
insn = read_memory_integer (pc, 2);
}
else
@@ -706,9 +706,4 @@ Set this to be able to access processor-type-specific registers.\n\
sh_set_processor_type_command (strsave (DEFAULT_SH_TYPE), 0);
add_com ("regs", class_vars, sh_show_regs, "Print all registers");
-
- /* Reduce the remote write size because some CMONs can't take
- more than 400 bytes in a packet. 300 seems like a safe bet. */
- remote_write_size = 300;
}
-