diff options
author | Alan Hayward <alan.hayward@arm.com> | 2018-03-26 10:39:24 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2018-03-26 10:54:55 +0100 |
commit | 5cd3e386e0ac84b0ba1e0737853f4504ba24f677 (patch) | |
tree | 16ec0192a901f38def1cef893c650f8aec1912ab /gdb/regformats/regdef.h | |
parent | af9d57d205eb656a01b9688c3efa591ad8f1a2a9 (diff) | |
download | gdb-5cd3e386e0ac84b0ba1e0737853f4504ba24f677.zip gdb-5cd3e386e0ac84b0ba1e0737853f4504ba24f677.tar.gz gdb-5cd3e386e0ac84b0ba1e0737853f4504ba24f677.tar.bz2 |
Make gdbserver reg_defs a vector of objects
gdb/
* regformats/regdef.h (reg): Add constructors.
gdb/gdbserver/
* regcache.c (find_register_by_number): Return a ref.
(find_regno): Use references.
(register_size): Likewise.
(register_data): Likewise.
* tdesc.c (target_desc::~target_desc): Remove free calls.
(target_desc::operator==): Use std::vector compare.
(init_target_desc): Use reference.
(tdesc_create_reg): Use reg constructors.
* tdesc.h (struct target_desc): Replace pointer with object.
Diffstat (limited to 'gdb/regformats/regdef.h')
-rw-r--r-- | gdb/regformats/regdef.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/regformats/regdef.h b/gdb/regformats/regdef.h index 262d03c..4775e86 100644 --- a/gdb/regformats/regdef.h +++ b/gdb/regformats/regdef.h @@ -21,6 +21,18 @@ struct reg { + reg () + : name (""), + offset (0), + size (0) + {} + + reg (const char *_name, int _size) + : name (_name), + offset (0), + size (_size) + {} + /* The name of this register - NULL for pad entries. */ const char *name; |