aboutsummaryrefslogtreecommitdiff
path: root/gdb/mn10200-tdep.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1997-03-21 06:15:27 +0000
committerJeff Law <law@redhat.com>1997-03-21 06:15:27 +0000
commitfe380dcc43ebf90a53dc13180660ad0710cb7197 (patch)
tree22e042262af18f4fd5efc65512087371dff1e749 /gdb/mn10200-tdep.c
parentaa7cec3fb81e3ba3b93c112297ebfc147f958f9d (diff)
downloadgdb-fe380dcc43ebf90a53dc13180660ad0710cb7197.zip
gdb-fe380dcc43ebf90a53dc13180660ad0710cb7197.tar.gz
gdb-fe380dcc43ebf90a53dc13180660ad0710cb7197.tar.bz2
* mn10200-tdep.c (mn10200_analyze_prologue): Look for save of "a1"
in the prologue too.
Diffstat (limited to 'gdb/mn10200-tdep.c')
-rw-r--r--gdb/mn10200-tdep.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
index 206e553..3090597 100644
--- a/gdb/mn10200-tdep.c
+++ b/gdb/mn10200-tdep.c
@@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
mov fp,a0
mov sp,fp
add <size>,sp
- Register saves for d2, d3, a3 as needed. Saves start
+ Register saves for d2, d3, a1, a2 as needed. Saves start
at fp - <size> and work towards higher addresses. Note
that the saves are actually done off the stack pointer
in the prologue! This makes for smaller code and easier
@@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Without frame pointer:
add <size>,sp
- Register saves for d2, d3, a3 as needed. Saves start
+ Register saves for d2, d3, a1, a2 as needed. Saves start
at sp and work towards higher addresses.
@@ -325,6 +325,7 @@ mn10200_analyze_prologue (fi, pc)
Search for movx d2,(X,a3) (0xf55eXX)
then movx d3,(X,a3) (0xf55fXX)
+ then mov a1,(X,a3) (0x5dXX) No frame pointer case
then mov a2,(X,a3) (0x5eXX) No frame pointer case
or mov a0,(X,a3) (0x5cXX) Frame pointer case. */
@@ -365,6 +366,23 @@ mn10200_analyze_prologue (fi, pc)
if (status != 0)
return addr;
}
+ if (buf[0] == 0x5d)
+ {
+ if (fi)
+ {
+ status = target_read_memory (addr + 1, buf, 1);
+ if (status != 0)
+ return addr;
+ fi->fsr.regs[5] = (fi->frame + stack_size
+ + extract_signed_integer (buf, 1));
+ }
+ addr += 2;
+ if (addr >= stop)
+ return addr;
+ status = target_read_memory (addr, buf, 2);
+ if (status != 0)
+ return addr;
+ }
if (buf[0] == 0x5e || buf[0] == 0x5c)
{
if (fi)