aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2004-03-29 17:58:05 +0000
committerDaniel Jacobowitz <drow@false.org>2004-03-29 17:58:05 +0000
commit8d5f9dcb37b90814ac723d46d5b93169da19e391 (patch)
treebc9f5608aa27aa4a414dbde78f97f9aedd4c4592
parent9d58e29db23ab0278670a06765821f4189c8159e (diff)
downloadgdb-8d5f9dcb37b90814ac723d46d5b93169da19e391.zip
gdb-8d5f9dcb37b90814ac723d46d5b93169da19e391.tar.gz
gdb-8d5f9dcb37b90814ac723d46d5b93169da19e391.tar.bz2
* mips-tdep.c (mips_pdr_data): New.
(non_heuristic_proc_desc): Use objfile_data and set_objfile_data. (_initialize_mips_tdep): Initialize mips_pdr_data.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/mips-tdep.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9d631d7..1713275 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-tdep.c (mips_pdr_data): New.
+ (non_heuristic_proc_desc): Use objfile_data and set_objfile_data.
+ (_initialize_mips_tdep): Initialize mips_pdr_data.
+
2004-03-29 Corinna Vinschen <vinschen@redhat.com>
* minsyms.c (install_minimal_symbols): Move dropping leading
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index cf1eddc..95a0063 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -54,6 +54,8 @@
#include "frame-base.h"
#include "trad-frame.h"
+static const struct objfile_data *mips_pdr_data;
+
static void set_reg_offset (CORE_ADDR *saved_regs, int regnum, CORE_ADDR off);
static struct type *mips_register_type (struct gdbarch *gdbarch, int regnum);
@@ -2298,7 +2300,7 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
sec = find_pc_section (pc);
if (sec != NULL)
{
- priv = (struct mips_objfile_private *) sec->objfile->obj_private;
+ priv = (struct mips_objfile_private *) objfile_data (sec->objfile, mips_pdr_data);
/* Search the ".pdr" section generated by GAS. This includes most of
the information normally found in ECOFF PDRs. */
@@ -2316,7 +2318,7 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
priv = obstack_alloc (&sec->objfile->objfile_obstack,
sizeof (struct mips_objfile_private));
priv->size = 0;
- sec->objfile->obj_private = priv;
+ set_objfile_data (sec->objfile, mips_pdr_data, priv);
}
else if (priv == NULL)
{
@@ -2344,7 +2346,7 @@ non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
else
priv->size = 0;
- sec->objfile->obj_private = priv;
+ set_objfile_data (sec->objfile, mips_pdr_data, priv);
}
the_bfd = NULL;
@@ -6104,6 +6106,8 @@ _initialize_mips_tdep (void)
gdbarch_register (bfd_arch_mips, mips_gdbarch_init, mips_dump_tdep);
+ mips_pdr_data = register_objfile_data ();
+
/* Add root prefix command for all "set mips"/"show mips" commands */
add_prefix_cmd ("mips", no_class, set_mips_command,
"Various MIPS specific commands.",