aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-03-08 19:28:27 +0000
committerPedro Alves <palves@redhat.com>2010-03-08 19:28:27 +0000
commit081058572de4f2c063bfbe76017134a9d8fd9907 (patch)
tree696e5bf63f919faf20ad6e98c777394acb0f619f /gdb/gdbarch.c
parent7c953934352840c28dcda0c8a6a18660aa1e3ab9 (diff)
downloadgdb-081058572de4f2c063bfbe76017134a9d8fd9907.zip
gdb-081058572de4f2c063bfbe76017134a9d8fd9907.tar.gz
gdb-081058572de4f2c063bfbe76017134a9d8fd9907.tar.bz2
* solib.c (solib_find): Replace extension if
solib_symbols_extension is set in the target gdbarch. * arm-symbian-tdep.c (arm_symbian_init_abi): Set solib_symbols_extension to "sym". * gdbarch.sh (solib_symbols_extension): New variable. (pstring): New function. * gdbarch.h, gdbarch.c: Regenerate.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index f482572..9aa6111 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -77,6 +77,14 @@ pformat (const struct floatformat **format)
return format[0]->name;
}
+static const char *
+pstring (const char *string)
+{
+ if (string == NULL)
+ return "(null)";
+ return string;
+}
+
/* Maintain the struct gdbarch object */
@@ -255,6 +263,7 @@ struct gdbarch
const char * qsupported;
gdbarch_auto_charset_ftype *auto_charset;
gdbarch_auto_wide_charset_ftype *auto_wide_charset;
+ const char * solib_symbols_extension;
};
@@ -401,6 +410,7 @@ struct gdbarch startup_gdbarch =
0, /* qsupported */
default_auto_charset, /* auto_charset */
default_auto_wide_charset, /* auto_wide_charset */
+ 0, /* solib_symbols_extension */
/* startup_gdbarch() */
};
@@ -1148,6 +1158,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: sofun_address_maybe_missing = %s\n",
plongest (gdbarch->sofun_address_maybe_missing));
fprintf_unfiltered (file,
+ "gdbarch_dump: solib_symbols_extension = %s\n",
+ pstring (gdbarch->solib_symbols_extension));
+ fprintf_unfiltered (file,
"gdbarch_dump: sp_regnum = %s\n",
plongest (gdbarch->sp_regnum));
fprintf_unfiltered (file,
@@ -3647,6 +3660,22 @@ set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch,
gdbarch->auto_wide_charset = auto_wide_charset;
}
+const char *
+gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
+ return gdbarch->solib_symbols_extension;
+}
+
+void
+set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
+ const char * solib_symbols_extension)
+{
+ gdbarch->solib_symbols_extension = solib_symbols_extension;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */