aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-19 12:26:35 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-19 12:26:35 +0000
commit203c3895a5003367e77494ca9428446417fce1bc (patch)
tree3bf4251bc1ca88b89716661d8c1c7ec00c84157a /gdb/gdbarch.c
parent149ad273c520ca22c19edc35f054fd05fe6cc6e7 (diff)
downloadgdb-203c3895a5003367e77494ca9428446417fce1bc.zip
gdb-203c3895a5003367e77494ca9428446417fce1bc.tar.gz
gdb-203c3895a5003367e77494ca9428446417fce1bc.tar.bz2
* gdbarch.sh (sofun_address_maybe_missing): New gdbarch variable.
* gdbarch.c, gdbarch.h: Regenerate. * dbxread.c (find_stab_function_addr): Define unconditionally. (read_dbx_symtab): Use gdbarch_sofun_address_maybe_missing instead of SOFUN_ADDRESS_MAYBE_MISSING. (end_psymtab): Likewise. (process_one_symbol): Likewise. * mdebugread.c (parse_partial_symbols): Likewise. * symtab.h (struct minimal_symbol): Always define "filename" member. * elfread.c (elf_symtab_read): Use msym->filename unconditionally. * minsyms.c (lookup_minimal_symbol): Likewise. * symmisc.c (dump_msymbols): Likewise. * config/i386/i386sol2.mt (DEPRECATED_TM_FILE): Remove. * config/i386/linux.mt (DEPRECATED_TM_FILE): Remove. * config/i386/tm-i386sol2.h: Remove file. * config/i386/tm-linux.h: Remove file. * i386-linux-tdep.c (i386_linux_init_abi): Add call to set_gdbarch_sofun_address_maybe_missing. * i386-sol2-tdep.c (i386_sol2_init_abi): Likewise. * config/powerpc/linux.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/nbsd.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/obsd.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/ppc-eabi.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/ppc-sim.mt (DEPRECATED_TM_FILE): Remove. * config/powerpc/tm-ppc-eabi.h: Remove file. * rs6000-tdep.c (rs6000_gdbarch_init): Add call to set_gdbarch_sofun_address_maybe_missing. * config/sparc/sol2-64.mt (DEPRECATED_TM_FILE): Remove. * config/sparc/sol2.mt (DEPRECATED_TM_FILE): Remove. * config/sparc/tm-sol2.h: Remove file. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Add call to set_gdbarch_sofun_address_maybe_missing. * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Likewise. doc/ChangeLog: * gdbarch.texi (Target Conditionals): Remove documentation of SOFUN_ADDRESS_MAYBE_MISSING, replaced by ... (Compiler Characteristics): ... documentation of set_gdbarch_sofun_address_maybe_missing.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 818e055..4759236 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -228,6 +228,7 @@ struct gdbarch
gdbarch_overlay_update_ftype *overlay_update;
gdbarch_core_read_description_ftype *core_read_description;
gdbarch_static_transform_name_ftype *static_transform_name;
+ int sofun_address_maybe_missing;
};
@@ -348,6 +349,7 @@ struct gdbarch startup_gdbarch =
0, /* overlay_update */
0, /* core_read_description */
0, /* static_transform_name */
+ 0, /* sofun_address_maybe_missing */
/* startup_gdbarch() */
};
@@ -593,6 +595,7 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
/* Skip verify of overlay_update, has predicate */
/* Skip verify of core_read_description, has predicate */
/* Skip verify of static_transform_name, has predicate */
+ /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -978,6 +981,9 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
"gdbarch_dump: software_single_step = <0x%lx>\n",
(long) current_gdbarch->software_single_step);
fprintf_unfiltered (file,
+ "gdbarch_dump: sofun_address_maybe_missing = %s\n",
+ paddr_d (current_gdbarch->sofun_address_maybe_missing));
+ fprintf_unfiltered (file,
"gdbarch_dump: sp_regnum = %s\n",
paddr_d (current_gdbarch->sp_regnum));
fprintf_unfiltered (file,
@@ -2964,6 +2970,23 @@ set_gdbarch_static_transform_name (struct gdbarch *gdbarch,
gdbarch->static_transform_name = static_transform_name;
}
+int
+gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n");
+ return gdbarch->sofun_address_maybe_missing;
+}
+
+void
+set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch,
+ int sofun_address_maybe_missing)
+{
+ gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */