diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-05-05 12:58:11 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-05-21 17:49:16 +0200 |
commit | ecc37a5acc8ff504d62487149f61955343d35fcf (patch) | |
tree | 49b786b54bd3862532051e8b77f581d34e4a5809 /gdb/amd64obsd-tdep.c | |
parent | b7611c43bf5dcdc84b4432fccef22247af11449e (diff) | |
download | gdb-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/amd64obsd-tdep.c')
-rw-r--r-- | gdb/amd64obsd-tdep.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c index 2cc0a0f..5a5e209 100644 --- a/gdb/amd64obsd-tdep.c +++ b/gdb/amd64obsd-tdep.c @@ -55,6 +55,11 @@ amd64obsd_supply_regset (const struct regset *regset, ((const gdb_byte *)regs) + tdep->sizeof_gregset); } +static const struct regset amd64obsd_combined_regset = + { + NULL, amd64obsd_supply_regset, NULL + }; + static const struct regset * amd64obsd_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) @@ -66,11 +71,7 @@ amd64obsd_regset_from_core_section (struct gdbarch *gdbarch, if (strcmp (sect_name, ".reg") == 0 && sect_size >= tdep->sizeof_gregset + I387_SIZEOF_FXSAVE) - { - if (tdep->gregset == NULL) - tdep->gregset = regset_alloc (gdbarch, amd64obsd_supply_regset, NULL); - return tdep->gregset; - } + return &amd64obsd_combined_regset; return NULL; } |