From ffe1f3ee3fa61f090624918bd2d7c276b71f536f Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Tue, 13 Aug 2002 11:03:42 +0000 Subject: [PATCH] * m68hc11-tdep.c (M6812_OP_PSHX, M6812_OP_PSHY): New defines. (m6812_prolog): They can appear in 68HC12 function prologue. (m68hc11_frame_chain): Cleanup. --- gdb/ChangeLog | 6 ++++++ gdb/m68hc11-tdep.c | 11 +++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 21c8a94..d7209ae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-08-13 Stephane Carrez + + * m68hc11-tdep.c (M6812_OP_PSHX, M6812_OP_PSHY): New defines. + (m6812_prolog): They can appear in 68HC12 function prologue. + (m68hc11_frame_chain): Cleanup. + 2002-08-12 Andrew Cagney * i386-tdep.h (i386_register_byte, i386_register_raw_size): Delete diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index c438914..125d40f 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for Motorola 68HC11 & 68HC12 Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by Stephane Carrez, stcarrez@worldnet.fr + Contributed by Stephane Carrez, stcarrez@nerim.fr This file is part of GDB. @@ -364,6 +364,8 @@ m68hc11_pop_frame (void) #define M6812_PB_PSHW (0xae) #define M6812_OP_STS (0x7f) #define M6812_OP_LEAS (0x1b) +#define M6812_OP_PSHX (0x34) +#define M6812_OP_PSHY (0x35) /* Operand extraction. */ #define OP_DIRECT (0x100) /* 8-byte direct addressing. */ @@ -423,6 +425,8 @@ static struct insn_sequence m6812_prologue[] = { OP_IMM_HIGH, OP_IMM_LOW } }, { P_SET_FRAME, 3, { M6812_OP_STS, OP_IMM_HIGH, OP_IMM_LOW } }, { P_LOCAL_N, 2, { M6812_OP_LEAS, OP_PBYTE } }, + { P_LOCAL_2, 1, { M6812_OP_PSHX } }, + { P_LOCAL_2, 1, { M6812_OP_PSHY } }, { P_LAST, 0 } }; @@ -686,11 +690,6 @@ m68hc11_frame_chain (struct frame_info *frame) addr = frame->frame + frame->extra_info->size + STACK_CORRECTION - 2; addr = read_memory_unsigned_integer (addr, 2) & 0x0FFFF; - if (addr == 0) - { - return (CORE_ADDR) 0; - } - return addr; } -- 2.7.4