* mn10300-tdep.c (mn10300_analyze_prologue): Don't compute saved
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 8 Jun 2004 05:27:32 +0000 (05:27 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 8 Jun 2004 05:27:32 +0000 (05:27 +0000)
regs if PC is on movm.

gdb/ChangeLog
gdb/mn10300-tdep.c

index e5442b7..60f3854 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-08  Alexandre Oliva  <aoliva@redhat.com>
+
+       * mn10300-tdep.c (mn10300_analyze_prologue): Don't compute saved
+       regs if PC is on movm.
+
 2004-06-07  Jim Blandy  <jimb@redhat.com>
 
        Add native Linux support for the PowerPC E500.
index a065e18..1ecf8cb 100644 (file)
@@ -457,8 +457,8 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
   addr = func_addr;
 
   /* Suck in two bytes.  */
-  status = read_memory_nobpt (addr, buf, 2);
-  if (status != 0)
+  if (addr + 2 >= stop
+      || (status = read_memory_nobpt (addr, buf, 2)) != 0)
     {
       fix_frame_pointer (fi, 0);
       return addr;