aboutsummaryrefslogtreecommitdiff
path: root/gdb/regformats/regdef.h
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2018-04-18 11:28:51 +0100
committerAlan Hayward <alan.hayward@arm.com>2018-04-18 14:00:30 +0100
commitea3e7d717982e3c467edc7886b1d6cc2807195af (patch)
treea50ee7f7b3986c136909b29040ff67bb493fb37f /gdb/regformats/regdef.h
parenta7504f87d41694d441fabb3308631df4d2750c24 (diff)
downloadgdb-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.h8
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)
{}