aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1993-06-09 00:47:13 +0000
committerSteve Chamberlain <sac@cygnus>1993-06-09 00:47:13 +0000
commitdf14b38bafeee2205a66b464643e5c5f6443296c (patch)
tree631f3402aa8bb454f17c305a1e0d55db4ebaf36a /gdb/sh-tdep.c
parentbf3b8abd19272a3942e5d64552f6068d98d255fc (diff)
downloadgdb-df14b38bafeee2205a66b464643e5c5f6443296c.zip
gdb-df14b38bafeee2205a66b464643e5c5f6443296c.tar.gz
gdb-df14b38bafeee2205a66b464643e5c5f6443296c.tar.bz2
* coffread.c (init_stringtab): Fix bug where sizeof(long) != 4.
* gdbcore.h, core.c (read_memory_unsigned_integer): New function. * findvar.c (read_register, write_register): Fix thinko where sizeof(host long) != sizeof(target int). * h8300-tdep.c: Use new read_memory_unsigned_integer call. * sh-tdep.c (_initialize_sh_tdep): Add memory_size command.
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 74e746d..e70dfbb 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -33,6 +33,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "../opcodes/sh-opc.h"
+
+
/* Prologue looks like
[mov.l <regs>,@-r15]...
[sts.l pr,@-r15]
@@ -152,7 +154,8 @@ frame_find_saved_regs (fi, fsr)
depth += -((char) (insn & 0xff));
insn = read_memory_integer (pc, 2);
}
- else break;
+ else
+ break;
}
/* Now we know how deep things are, we can work out their addresses */
@@ -174,7 +177,6 @@ frame_find_saved_regs (fi, fsr)
if (have_fp)
{
-
fsr->regs[SP_REGNUM] = read_memory_integer (fsr->regs[FP_REGNUM], 4);
}
else
@@ -182,7 +184,6 @@ frame_find_saved_regs (fi, fsr)
fsr->regs[SP_REGNUM] = fi->frame - 4;
}
- /* Remember the address of the frame pointer */
/* Work out the return pc - either from the saved pr or the pr
value */
@@ -240,3 +241,15 @@ pop_frame ()
set_current_frame (create_new_frame (read_register (FP_REGNUM),
read_pc ()));
}
+
+
+_initialize_sh_tdep ()
+{
+ extern int sim_memory_size;
+ /* FIXME, there should be a way to make a CORE_ADDR variable settable. */
+ add_show_from_set
+ (add_set_cmd ("memory_size", class_support, var_uinteger,
+ (char *) &sim_memory_size,
+ "Set simulated memory size of simulator target.", &setlist),
+ &showlist);
+}