aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386obsd-tdep.c
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2014-05-05 12:58:11 +0000
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-05-21 17:49:16 +0200
commitecc37a5acc8ff504d62487149f61955343d35fcf (patch)
tree49b786b54bd3862532051e8b77f581d34e4a5809 /gdb/i386obsd-tdep.c
parentb7611c43bf5dcdc84b4432fccef22247af11449e (diff)
downloadgdb-ecc37a5acc8ff504d62487149f61955343d35fcf.zip
gdb-ecc37a5acc8ff504d62487149f61955343d35fcf.tar.gz
gdb-ecc37a5acc8ff504d62487149f61955343d35fcf.tar.bz2
X86: Replace regset_alloc() invocations by static regset structures.
After removal of the regset_alloc invocations, the appropriate tdep fields become obsolete and are thus removed.
Diffstat (limited to 'gdb/i386obsd-tdep.c')
-rw-r--r--gdb/i386obsd-tdep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index 7d9ba93..8f76e43 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -152,6 +152,11 @@ i386obsd_aout_supply_regset (const struct regset *regset,
i387_supply_fsave (regcache, regnum, gregs + tdep->sizeof_gregset);
}
+static const struct regset i386obsd_aout_gregset =
+ {
+ NULL, i386obsd_aout_supply_regset, NULL
+ };
+
static const struct regset *
i386obsd_aout_regset_from_core_section (struct gdbarch *gdbarch,
const char *sect_name,
@@ -164,12 +169,7 @@ i386obsd_aout_regset_from_core_section (struct gdbarch *gdbarch,
if (strcmp (sect_name, ".reg") == 0
&& sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE)
- {
- if (tdep->gregset == NULL)
- tdep->gregset =
- regset_alloc (gdbarch, i386obsd_aout_supply_regset, NULL);
- return tdep->gregset;
- }
+ return &i386obsd_aout_gregset;
return NULL;
}