diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2015-01-15 10:20:45 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2015-02-04 14:14:32 +0100 |
commit | f962539ad23759af4ba8f7eece1946fdc2f50876 (patch) | |
tree | 8df3eaef5b889514933cce7c6b98564c48e003e3 /gdb/regset.h | |
parent | dde9acd693251ccbe28d2d9c6c8b3cdc8ca884ed (diff) | |
download | gdb-f962539ad23759af4ba8f7eece1946fdc2f50876.zip gdb-f962539ad23759af4ba8f7eece1946fdc2f50876.tar.gz gdb-f962539ad23759af4ba8f7eece1946fdc2f50876.tar.bz2 |
Warn if core file register section is larger than expected
When reading a core file register section which is larger than
expected, emit a warning. Assume that a register section usually has
exactly the size specified by the regset section iterator. In some
special cases this assumption is wrong, or at least does not match the
regset supply function's logic. Thus also add a way to suppress the
warning in those cases, using a new flag REGSET_VARIABLE_SIZE.
gdb/ChangeLog:
* regset.h (struct regset): Add flags field.
(REGSET_VARIABLE_SIZE): New value for a regset's flags field.
* corelow.c (get_core_register_section): Add warning if the size
exceeds the requested size and the regset does not have the
REGSET_VARIABLE_SIZE flag set.
* alphanbsd-tdep.c (alphanbsd_gregset): Add REGSET_VARIABLE_SIZE
flag.
* armbsd-tdep.c (armbsd_gregset): Likewise.
* hppa-hpux-tdep.c (hppa_hpux_regset): Likewise.
* hppaobsd-tdep.c (hppaobsd_gregset): Likewise.
* m68kbsd-tdep.c (m68kbsd_gregset): Likewise.
* mipsnbsd-tdep.c (mipsnbsd_gregset): Likewise.
Diffstat (limited to 'gdb/regset.h')
-rw-r--r-- | gdb/regset.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/regset.h b/gdb/regset.h index 3585322..d6edaa5 100644 --- a/gdb/regset.h +++ b/gdb/regset.h @@ -43,6 +43,13 @@ struct regset /* Function collecting values in a register set from a register cache. */ collect_regset_ftype *collect_regset; + + unsigned flags; }; +/* Values for a regset's 'flags' field. */ + +#define REGSET_VARIABLE_SIZE 1 /* Accept a larger regset section size + in a core file without warning. */ + #endif /* regset.h */ |