summaryrefslogtreecommitdiff
path: root/gdb/vax-tdep.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>1999-05-05 14:45:51 +0000
committerStan Shebs <shebs@apple.com>1999-05-05 14:45:51 +0000
commit049f10d7dc48a42b664a15149f83d5c3db004ef7 (patch)
tree8dd4e1a383afddd41a30a65adf68142dfd45ec72 /gdb/vax-tdep.c
parent1942e83ab587eb3c0c54e57e9d1c9e11c17ac07e (diff)
downloadgdb-049f10d7dc48a42b664a15149f83d5c3db004ef7.tar.gz
import gdb-19990504 snapshot
Diffstat (limited to 'gdb/vax-tdep.c')
-rw-r--r--gdb/vax-tdep.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index b378571ec56..7e0426035f1 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -29,6 +29,36 @@ 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
+vax_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 == 0x31)
+ pc += 3; /* skip brw */
+ if (op == 0xC2
+ && ((unsigned char) read_memory_integer (pc+2, 1)) == 0x5E)
+ pc += 3; /* skip subl2 */
+ if (op == 0x9E
+ && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xAE
+ && ((unsigned char) read_memory_integer(pc+3, 1)) == 0x5E)
+ pc += 4; /* skip movab */
+ if (op == 0x9E
+ && ((unsigned char) read_memory_integer (pc+1, 1)) == 0xCE
+ && ((unsigned char) read_memory_integer(pc+4, 1)) == 0x5E)
+ pc += 5; /* skip movab */
+ if (op == 0x9E
+ && ((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 vax instruction at address MEMADDR in debugged memory,
from disassembler info INFO.
Returns length of the instruction, in bytes. */