/* Renesas M32C target-dependent code for GDB, the GNU debugger.
- Copyright 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GDB.
}
-int
+static int
m32c_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group)
{
/* Analyze the function prologue for ARCH at START, going no further
than LIMIT, and place a description of what we found in
PROLOGUE. */
-void
+static void
m32c_analyze_prologue (struct gdbarch *arch,
CORE_ADDR start, CORE_ADDR limit,
struct m32c_prologue *prologue)
{
struct type *func_type = value_type (function);
+ /* Dereference function pointer types. */
+ if (TYPE_CODE (func_type) == TYPE_CODE_PTR)
+ func_type = TYPE_TARGET_TYPE (func_type);
+
gdb_assert (TYPE_CODE (func_type) == TYPE_CODE_FUNC ||
TYPE_CODE (func_type) == TYPE_CODE_METHOD);
return ptr;
}
-void
+static void
m32c_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc,
int *frame_regnum,
LONGEST *frame_offset)
set_gdbarch_virtual_frame_pointer (arch, m32c_virtual_frame_pointer);
+ /* m32c function boundary addresses are not necessarily even.
+ Therefore, the `vbit', which indicates a pointer to a virtual
+ member function, is stored in the delta field, rather than as
+ the low bit of a function pointer address.
+
+ In order to verify this, see the definition of
+ TARGET_PTRMEMFUNC_VBIT_LOCATION in gcc/defaults.h along with the
+ definition of FUNCTION_BOUNDARY in gcc/config/m32c/m32c.h. */
+ set_gdbarch_vbit_in_delta (arch, 1);
+
return arch;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+extern initialize_file_ftype _initialize_m32c_tdep;
void
_initialize_m32c_tdep (void)