aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-19 12:23:21 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-19 12:23:21 +0000
commit149ad273c520ca22c19edc35f054fd05fe6cc6e7 (patch)
tree29f56f16dd0bf1929f57b55e92925c497366e5dd /gdb/gdbarch.c
parent603b72571dd17826efe9843dab8fbb0d5012a1f3 (diff)
downloadgdb-149ad273c520ca22c19edc35f054fd05fe6cc6e7.zip
gdb-149ad273c520ca22c19edc35f054fd05fe6cc6e7.tar.gz
gdb-149ad273c520ca22c19edc35f054fd05fe6cc6e7.tar.bz2
* gdbarch.sh (static_transform_name): New gdbarch callback.
* gdbarch.c, gdbarch.h: Regenerate. * dbxread.c (read_dbx_symtab): Use gdbarch_static_transform_name instead of STATIC_TRANSFORM_NAME. * mdebugread.c (parse_partial_symbols): Likewise. * stabsread.c (define_symbol): Likewise. * xcoffread.c (scan_xcoff_symtab): Likewise. * config/i368/tm-i386sol2.h (STATIC_TRANSFORM_NAME): Remove. (IS_STATIC_TRANSFORM_NAME): Remove. * i386-tdep.c (sunpro_static_transform_name): Remove, move to ... * i386-sol2-tdep.c (i386_sol2_static_transform_name): ... here. (i386_sol2_init_abi): Install it. * config/sparc/tm-sol2.h (STATIC_TRANSFORM_NAME): Remove. (IS_STATIC_TRANSFORM_NAME): Remove. * sparc-tdep.c (sparc_stabs_unglobalize_name): Remove, move to ... * sparc-sol2-tdep.c (sparc_sol2_static_transform_name): ... here. (sparc32_sol2_init_abi): Install it. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Likewise. * sparc-tdep.h (sparc_sol2_static_transform_name): Add prototype.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 8b51c02..818e055 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -227,6 +227,7 @@ struct gdbarch
gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint;
gdbarch_overlay_update_ftype *overlay_update;
gdbarch_core_read_description_ftype *core_read_description;
+ gdbarch_static_transform_name_ftype *static_transform_name;
};
@@ -346,6 +347,7 @@ struct gdbarch startup_gdbarch =
0, /* skip_permanent_breakpoint */
0, /* overlay_update */
0, /* core_read_description */
+ 0, /* static_transform_name */
/* startup_gdbarch() */
};
@@ -590,6 +592,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of skip_permanent_breakpoint, has predicate */
/* Skip verify of overlay_update, has predicate */
/* Skip verify of core_read_description, has predicate */
+ /* Skip verify of static_transform_name, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -984,6 +987,12 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
"gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
(long) current_gdbarch->stabs_argument_has_addr);
fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n",
+ gdbarch_static_transform_name_p (current_gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: static_transform_name = <0x%lx>\n",
+ (long) current_gdbarch->static_transform_name);
+ fprintf_unfiltered (file,
"gdbarch_dump: target_desc = %s\n",
paddr_d ((long) current_gdbarch->target_desc));
fprintf_unfiltered (file,
@@ -2931,6 +2940,30 @@ set_gdbarch_core_read_description (struct gdbarch *gdbarch,
gdbarch->core_read_description = core_read_description;
}
+int
+gdbarch_static_transform_name_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->static_transform_name != NULL;
+}
+
+char *
+gdbarch_static_transform_name (struct gdbarch *gdbarch, char *name)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->static_transform_name != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n");
+ return gdbarch->static_transform_name (name);
+}
+
+void
+set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
+ gdbarch_static_transform_name_ftype static_transform_name)
+{
+ gdbarch->static_transform_name = static_transform_name;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */