diff options
author | Alan Hayward <alan.hayward@arm.com> | 2018-04-18 11:28:51 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2018-04-18 14:00:30 +0100 |
commit | ea3e7d717982e3c467edc7886b1d6cc2807195af (patch) | |
tree | a50ee7f7b3986c136909b29040ff67bb493fb37f /gdb/regformats/regdef.h | |
parent | a7504f87d41694d441fabb3308631df4d2750c24 (diff) | |
download | gdb-ea3e7d717982e3c467edc7886b1d6cc2807195af.zip gdb-ea3e7d717982e3c467edc7886b1d6cc2807195af.tar.gz gdb-ea3e7d717982e3c467edc7886b1d6cc2807195af.tar.bz2 |
Commonise tdesc_reg and makes use of it in gdbserver tdesc
gdb/
* Makefile.in: Add arch/tdesc.c
* common/tdesc.c: New file.
* common/tdesc.h (tdesc_element_visitor): Move to here.
(tdesc_element): Likewise.
(tdesc_reg): Likewise.
(tdesc_reg_up): Likewise.
* regformats/regdef.h (reg): Add offset to constructors.
* target-descriptions.c (tdesc_element_visitor): Move from here.
(tdesc_element): Likewise.
(tdesc_reg): Likewise.
(tdesc_reg_up): Likewise.
gdbserver/
* Makefile.in: Add common/tdesc.c
* tdesc.c (init_target_desc): init all reg_defs from register vector.
(tdesc_create_reg): Create tdesc_reg.
* tdesc.h (tdesc_feature): Add register vector.
Diffstat (limited to 'gdb/regformats/regdef.h')
-rw-r--r-- | gdb/regformats/regdef.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/regformats/regdef.h b/gdb/regformats/regdef.h index 4775e86..7c80d45 100644 --- a/gdb/regformats/regdef.h +++ b/gdb/regformats/regdef.h @@ -21,15 +21,15 @@ struct reg { - reg () + reg (int _offset) : name (""), - offset (0), + offset (_offset), size (0) {} - reg (const char *_name, int _size) + reg (const char *_name, int _offset, int _size) : name (_name), - offset (0), + offset (_offset), size (_size) {} |