1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2005 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
7 * Copyright (C) 2007,2008 Øyvind Harboe *
8 * oyvind.harboe@zylin.com *
9 ***************************************************************************/
11 #ifndef OPENOCD_TARGET_REGISTER_H
12 #define OPENOCD_TARGET_REGISTER_H
14 #include "helper/replacements.h"
15 #include "helper/types.h"
38 REG_TYPE_ARCH_DEFINED
,
45 struct reg_data_type_vector
{
46 struct reg_data_type
*type
;
50 struct reg_data_type_union_field
{
52 struct reg_data_type
*type
;
53 struct reg_data_type_union_field
*next
;
56 struct reg_data_type_union
{
57 struct reg_data_type_union_field
*fields
;
60 struct reg_data_type_bitfield
{
66 struct reg_data_type_struct_field
{
70 struct reg_data_type_bitfield
*bitfield
;
71 struct reg_data_type
*type
;
73 struct reg_data_type_struct_field
*next
;
76 struct reg_data_type_struct
{
78 struct reg_data_type_struct_field
*fields
;
81 struct reg_data_type_flags_field
{
83 struct reg_data_type_bitfield
*bitfield
;
84 struct reg_data_type_flags_field
*next
;
87 struct reg_data_type_flags
{
89 struct reg_data_type_flags_field
*fields
;
92 enum reg_data_type_class
{
93 REG_TYPE_CLASS_VECTOR
,
95 REG_TYPE_CLASS_STRUCT
,
99 struct reg_data_type
{
102 enum reg_data_type_class type_class
;
104 struct reg_data_type_vector
*reg_type_vector
;
105 struct reg_data_type_union
*reg_type_union
;
106 struct reg_data_type_struct
*reg_type_struct
;
107 struct reg_data_type_flags
*reg_type_flags
;
112 /* Canonical name of the register. */
114 /* Number that gdb uses to access this register. */
116 /* TODO. This should probably be const. */
117 struct reg_feature
*feature
;
118 /* TODO: When true, the caller will save this register before running any algorithm. */
120 /* Pointer to place where the value is stored, in the format understood by
121 * the binarybuffer.h functions. */
123 /* The stored value needs to be written to the target. */
125 /* When true, value is valid. */
127 /* When false, the register doesn't actually exist in the target. */
129 /* Hide the register from gdb and omit it in 'reg' cmd output */
131 /* Size of the register in bits. */
133 /* Used for generating XML description of registers. Can be set to NULL for
134 * targets that don't use that. */
135 struct reg_data_type
*reg_data_type
;
136 /* Used for generating XML description of registers. Can be set to NULL for
137 * targets that don't use that. */
139 /* Pointer to architecture-specific info for this register. */
141 const struct reg_arch_type
*type
;
146 struct reg_cache
*next
;
147 struct reg
*reg_list
;
151 struct reg_arch_type
{
152 int (*get
)(struct reg
*reg
);
153 int (*set
)(struct reg
*reg
, uint8_t *buf
);
156 struct reg
*register_get_by_number(struct reg_cache
*first
,
157 uint32_t reg_num
, bool search_all
);
158 struct reg
*register_get_by_name(struct reg_cache
*first
,
159 const char *name
, bool search_all
);
160 struct reg_cache
**register_get_last_cache_p(struct reg_cache
**first
);
161 void register_unlink_cache(struct reg_cache
**cache_p
, const struct reg_cache
*cache
);
162 void register_cache_invalidate(struct reg_cache
*cache
);
164 void register_init_dummy(struct reg
*reg
);
166 #endif /* OPENOCD_TARGET_REGISTER_H */
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)