summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2002-11-07 07:47:22 +0000
committerJoel Brobecker <brobecker@gnat.com>2002-11-07 07:47:22 +0000
commitddfe3cb932948446d1a0aaed7962394b540c0dea (patch)
tree059e981d24a11729ac075641eab7e2c5a948da1a
parenta7e9693d8726facd211dbc64c839ce039336e5fc (diff)
downloadgdb-ddfe3cb932948446d1a0aaed7962394b540c0dea.tar.gz
Put in place the framework necessary for multiarching the hppa targets.
* hppa-tdep.c (hppa_gdbarch_init): New function. (hppa_dump_tdep): New function. (_initialize_hppa_tdep): Register the hppa gdbarch init function and tdep structure dumper. * config/pa/tm-hppa.h (GDB_MULTI_ARCH): New macro, defined to 0 until the multi-arching conversion has partially been completed.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/config/pa/tm-hppa.h2
-rw-r--r--gdb/hppa-tdep.c23
3 files changed, 35 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 006522662f4..aa5280f0f45 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-06 Joel Brobecker <brobecker@gnat.com>
+
+ Put in place the framework necessary for multiarching the hppa targets.
+ * hppa-tdep.c (hppa_gdbarch_init): New function.
+ (hppa_dump_tdep): New function.
+ (_initialize_hppa_tdep): Register the hppa gdbarch init function and
+ tdep structure dumper.
+ * config/pa/tm-hppa.h (GDB_MULTI_ARCH): New macro, defined to 0
+ until the multi-arching conversion has partially been completed.
+
2002-11-06 Andrew Cagney <ac131313@redhat.com>
* valops.c (value_assign): Merge lval_register case into
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 272078fbcb0..83873ecae56 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -24,6 +24,8 @@
#include "regcache.h"
+#define GDB_MULTI_ARCH 0
+
/* Forward declarations of some types we use in prototypes */
struct frame_info;
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index b356a3a819c..c64f6f7a7e6 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4724,6 +4724,28 @@ hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf)
TYPE_LENGTH (type));
}
+static struct gdbarch *
+hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+ struct gdbarch *gdbarch;
+
+ /* find a candidate among the list of pre-declared architectures. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return (arches->gdbarch);
+
+ /* If none found, then allocate and initialize one. */
+ gdbarch = gdbarch_alloc (&info, NULL);
+
+ return gdbarch;
+}
+
+static void
+hppa_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+ /* Nothing to print for the moment. */
+}
+
void
_initialize_hppa_tdep (void)
{
@@ -4732,6 +4754,7 @@ _initialize_hppa_tdep (void)
void tbreak_at_finish_command (char *arg, int from_tty);
void break_at_finish_at_depth_command (char *arg, int from_tty);
+ gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);
tm_print_insn = print_insn_hppa;
add_cmd ("unwind", class_maintenance, unwind_command,