aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
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')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/mn10200-tdep.c22
2 files changed, 23 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f23470e..2a6e9b34 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
Thu Mar 20 20:52:04 1997 Jeffrey A Law (law@cygnus.com)
+ * mn10200-tdep.c (mn10200_analyze_prologue): Look for save of "a1"
+ in the prologue too.
+
* remote-sim.c (gdb_os_vprintf_filtered): Fix to work with non-ANSI
compilers.
(gdb_os_evprintf_filtered): Similarly.
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)