# Convert from an sdb register number to an internal gdb register number.
m:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr::no_op_reg_to_regnum::0
# Provide a default mapping from a DWARF2 register number to a gdb REGNUM.
+# Return -1 for bad REGNUM. Note: Several targets get this wrong.
m:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr::no_op_reg_to_regnum::0
m:const char *:register_name:int regnr:regnr::0
# If your architecture doesn't need to adjust instructions before
# single-stepping them, consider using simple_displaced_step_copy_insn
# here.
+#
+# If the instruction cannot execute out of line, return NULL. The
+# core falls back to stepping past the instruction in-line instead in
+# that case.
M:struct displaced_step_closure *:displaced_step_copy_insn:CORE_ADDR from, CORE_ADDR to, struct regcache *regs:from, to, regs
# Return true if GDB should use hardware single-stepping to execute
struct objfile;
struct symbol;
struct displaced_step_closure;
-struct core_regset_section;
struct syscall;
struct agent_expr;
struct axs_value;
bfd *abfd;
/* Use default: NULL (ZERO). */
- struct gdbarch_tdep_info *tdep_info;
+ void *tdep_info;
/* Use default: GDB_OSABI_UNINITIALIZED (-1). */
enum gdb_osabi osabi;
#define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE)))
#define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE)))
+/* Duplicate STRING, returning an equivalent string that's allocated on the
+ obstack associated with GDBARCH. The string is freed when the corresponding
+ architecture is also freed. */
+
+extern char *gdbarch_obstack_strdup (struct gdbarch *arch, const char *string);
/* Helper function. Force an update of the current architecture.
then use that to allocate the architecture vector. */
struct obstack *obstack = XNEW (struct obstack);
obstack_init (obstack);
- gdbarch = obstack_alloc (obstack, sizeof (*gdbarch));
+ gdbarch = XOBNEW (obstack, struct gdbarch);
memset (gdbarch, 0, sizeof (*gdbarch));
gdbarch->obstack = obstack;
return data;
}
+/* See gdbarch.h. */
+
+char *
+gdbarch_obstack_strdup (struct gdbarch *arch, const char *string)
+{
+ return obstack_strdup (arch->obstack, string);
+}
+
/* Free a gdbarch struct. This should never happen in normal
operation --- once you've created a gdbarch, you keep it around.
static void
append_name (const char ***buf, int *nr, const char *name)
{
- *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
+ *buf = XRESIZEVEC (const char *, *buf, *nr + 1);
(*buf)[*nr] = name;
*nr += 1;
}