/* Target-machine dependent code for Motorola MCore for GDB, the GNU debugger
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
#include "symtab.h"
#include "value.h"
#include "gdbcmd.h"
+#include "regcache.h"
+#include "symfile.h"
+#include "gdbcore.h"
+#include "inferior.h"
/* Functions declared and used only in this file */
CORE_ADDR mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
-CORE_ADDR mcore_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+CORE_ADDR mcore_push_arguments (int nargs, struct value ** args, CORE_ADDR sp,
unsigned char struct_return, CORE_ADDR struct_addr);
void mcore_pop_frame (struct frame_info *fi);
/* The base of the current frame is in a frame pointer register.
This register is noted in frame_extra_info->fp_regnum.
- Note that the existance of an FP might also indicate that the
+ Note that the existence of an FP might also indicate that the
function has called alloca. */
#define MY_FRAME_IN_FP 0x2
{
printf_filtered ("MCORE: %s %08x %08x ",
commnt, (unsigned int) pc, (unsigned int) insn);
- (*tm_print_insn) (pc, &tm_print_insn_info);
+ TARGET_PRINT_INSN (pc, &tm_print_insn_info);
printf_filtered ("\n");
}
}
return dummy;
}
-/* Function prologues on the Motorol MCore processors consist of:
+/* Function prologues on the Motorola MCore processors consist of:
- adjustments to the stack pointer (r1 used as scratch register)
- store word/multiples that use r0 as the base address
CORE_ADDR func_addr, func_end, addr, stop;
CORE_ADDR stack_size;
int insn, rn;
- int status, fp_regnum, flags;
+ int status;
+ int fp_regnum = 0; /* dummy, valid when (flags & MY_FRAME_IN_FP) */
+ int flags;
int framesize;
int register_offsets[NUM_REGS];
char *name;
if (IS_SUBI0 (insn))
{
int offset = 1 + ((insn >> 4) & 0x1f);
- mcore_insn_debug (("MCORE: got subi r0,%d; contnuing\n", offset));
+ mcore_insn_debug (("MCORE: got subi r0,%d; continuing\n", offset));
framesize += offset;
continue;
}
struct symtab_and_line sal;
/* If we have line debugging information, then the end of the
- prologue should the first assembly instruction of the first
+ prologue should be the first assembly instruction of the first
source line */
if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
{
bytes) as hidden first arguments. */
CORE_ADDR
-mcore_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
unsigned char struct_return, CORE_ADDR struct_addr)
{
int argreg;