X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbarch.sh;h=f80cd5181ee0dcc3262efe6d6672884b763a82ab;hb=618f726fcb851883a0094aa7fa17003889b7189f;hp=14a5f9c5ebed835d5219c1dcaadea32ff86693b9;hpb=6b940e6a063ac13372b44a03a54b6be33d22a183;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 14a5f9c5eb..f80cd5181e 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -2,7 +2,7 @@ # Architecture commands for GDB, the GNU debugger. # -# Copyright (C) 1998-2015 Free Software Foundation, Inc. +# Copyright (C) 1998-2016 Free Software Foundation, Inc. # # This file is part of GDB. # @@ -461,6 +461,7 @@ m:int:ecoff_reg_to_regnum:int ecoff_regnr:ecoff_regnr::no_op_reg_to_regnum::0 # 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 @@ -763,6 +764,10 @@ V:ULONGEST:max_insn_length:::0: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 @@ -1172,7 +1177,7 @@ cat <. */ @@ -1233,7 +1238,6 @@ struct target_desc; struct objfile; struct symbol; struct displaced_step_closure; -struct core_regset_section; struct syscall; struct agent_expr; struct axs_value; @@ -1425,7 +1429,7 @@ struct gdbarch_info 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; @@ -1482,6 +1486,11 @@ extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size); #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. @@ -1737,7 +1746,7 @@ gdbarch_alloc (const struct gdbarch_info *info, 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; @@ -1787,6 +1796,14 @@ gdbarch_obstack_zalloc (struct gdbarch *arch, long size) 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. @@ -2197,7 +2214,7 @@ static struct gdbarch_registration *gdbarch_registry = NULL; 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; }