diff options
author | Stan Shebs <shebs@codesourcery.com> | 1999-05-05 14:45:51 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1999-05-05 14:45:51 +0000 |
commit | b83266a0e1813b7f4891d5d6b0ed6b7302a3fe98 (patch) | |
tree | c59a94fbe917e0839329b872139198c2a7a05ab1 /gdb/tahoe-tdep.c | |
parent | e1346c8d0969dad58ddc13c9c741cb0f4e6345a5 (diff) | |
download | gdb-b83266a0e1813b7f4891d5d6b0ed6b7302a3fe98.zip gdb-b83266a0e1813b7f4891d5d6b0ed6b7302a3fe98.tar.gz gdb-b83266a0e1813b7f4891d5d6b0ed6b7302a3fe98.tar.bz2 |
import gdb-19990504 snapshot
Diffstat (limited to 'gdb/tahoe-tdep.c')
-rw-r--r-- | gdb/tahoe-tdep.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gdb/tahoe-tdep.c b/gdb/tahoe-tdep.c index ea8a752..c57bc35 100644 --- a/gdb/tahoe-tdep.c +++ b/gdb/tahoe-tdep.c @@ -31,6 +31,37 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ static unsigned char *print_insn_arg (); +/* Advance PC across any function entry prologue instructions + to reach some "real" code. */ + +CORE_ADDR +tahoe_skip_prologue (pc) + CORE_ADDR pc; +{ + register int op = (unsigned char) read_memory_integer (pc, 1); + if (op == 0x11) + pc += 2; /* skip brb */ + if (op == 0x13) + pc += 3; /* skip brw */ + if (op == 0x2c + && ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5e) + pc += 3; /* skip subl2 */ + if (op == 0xe9 + && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xae + && ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5e) + pc += 4; /* skip movab */ + if (op == 0xe9 + && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xce + && ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5e) + pc += 5; /* skip movab */ + if (op == 0xe9 + && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xee + && ((unsigned char) read_memory_integer(pc+6, 1)) == 0x5e) + pc += 7; /* skip movab */ + return pc; +} + + /* Print the Tahoe instruction at address MEMADDR in debugged memory, on STREAM. Returns length of the instruction, in bytes. */ |