Make gdbserver reg_defs a vector of objects
authorAlan Hayward <alan.hayward@arm.com>
Mon, 26 Mar 2018 09:39:24 +0000 (10:39 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Mon, 26 Mar 2018 09:54:55 +0000 (10:54 +0100)
commit5cd3e386e0ac84b0ba1e0737853f4504ba24f677
tree16ec0192a901f38def1cef893c650f8aec1912ab
parentaf9d57d205eb656a01b9688c3efa591ad8f1a2a9
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.
gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/regcache.c
gdb/gdbserver/tdesc.c
gdb/gdbserver/tdesc.h
gdb/regformats/regdef.h