As it is mentioned here [1] type's ID is unique name within containing feature.
That said if regs of the same type located in different features it's required
to insert type definition at least in each feature.
See more details in discussion here [2].
[1] https://sourceware.org/gdb/onlinedocs/gdb/Target-Description-Format.html#Types
[2] https://github.com/foss-for-synopsys-dwc-arc-processors/openocd/commit/
2a5f5125ac8fa0e1359b6be03b209f9f5d1ade82#r33460077
Change-Id: Id92b061cfbf47d5c032a02c2c406b28affd0b02a
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Reviewed-on: http://openocd.zylin.com/5179
Tested-by: jenkins
Reviewed-by: Muhammad Omair Javaid <omair.javaid@linaro.org>
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
int reg_list_size;
char const *architecture;
char const **features = NULL;
int reg_list_size;
char const *architecture;
char const **features = NULL;
- char const **arch_defined_types = NULL;
int feature_list_size = 0;
int feature_list_size = 0;
- int num_arch_defined_types = 0;
char *tdesc = NULL;
int pos = 0;
int size = 0;
char *tdesc = NULL;
int pos = 0;
int size = 0;
- arch_defined_types = calloc(1, sizeof(char *));
retval = target_get_gdb_reg_list_noread(target, ®_list,
®_list_size, REG_CLASS_ALL);
retval = target_get_gdb_reg_list_noread(target, ®_list,
®_list_size, REG_CLASS_ALL);
/* generate target description according to register list */
if (features != NULL) {
while (features[current_feature]) {
/* generate target description according to register list */
if (features != NULL) {
while (features[current_feature]) {
+ char const **arch_defined_types = NULL;
+ int num_arch_defined_types = 0;
+ arch_defined_types = calloc(1, sizeof(char *));
xml_printf(&retval, &tdesc, &pos, &size,
"<feature name=\"%s\">\n",
features[current_feature]);
xml_printf(&retval, &tdesc, &pos, &size,
"<feature name=\"%s\">\n",
features[current_feature]);
"</feature>\n");
current_feature++;
"</feature>\n");
current_feature++;
+ free(arch_defined_types);
error:
free(features);
free(reg_list);
error:
free(features);
free(reg_list);
- free(arch_defined_types);
if (retval == ERROR_OK)
*tdesc_out = tdesc;
if (retval == ERROR_OK)
*tdesc_out = tdesc;
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)