diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-10-07 12:23:15 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-10-07 15:22:47 +0100 |
commit | 875880c661e71a7622d8f7282f0dd1ef756040ff (patch) | |
tree | 6afe61415e4bd8c415f39b5292e696698cc980bb /opcodes | |
parent | d3e12b29aef25bc9d1830b0a05643b11296f1b8f (diff) | |
download | gdb-875880c661e71a7622d8f7282f0dd1ef756040ff.zip gdb-875880c661e71a7622d8f7282f0dd1ef756040ff.tar.gz gdb-875880c661e71a7622d8f7282f0dd1ef756040ff.tar.bz2 |
Avoid using 'template' C++ keyword
'template' is used in include/opcode/aarch64.h as below,
typedef struct
{
const char *template;
uint32_t value;
int has_xt;
} aarch64_sys_ins_reg;
and it triggers compilation errors when GDB is built in C++ mode.
In file included from git/gdb/aarch64-tdep.c:62:0:
git/gdb/../include/opcode/aarch64.h:651:15: error: expected unqualified-id before 'template'
const char *template;
This patch is to rename field template to name.
gas/
* config/tc-aarch64.c (md_begin): Access field 'name' rather
than 'template'.
include/opcode/
* aarch64.h (aarch64_sys_ins_reg) <template>: Removed.
<name>: New field.
opcodes/
* aarch64-dis.c (aarch64_ext_sysins_op): Access field
'name' rather than 'template'.
* aarch64-opc.c (aarch64_print_operand): Likewise.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 6 | ||||
-rw-r--r-- | opcodes/aarch64-dis.c | 4 | ||||
-rw-r--r-- | opcodes/aarch64-opc.c | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index c9c576f..1effd13 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2015-10-07 Yao Qi <yao.qi@linaro.org> + + * aarch64-dis.c (aarch64_ext_sysins_op): Access field + 'name' rather than 'template'. + * aarch64-opc.c (aarch64_print_operand): Likewise. + 2015-10-07 Claudiu Zissulescu <claziss@synopsys.com> * arc-dis.c: Revamped file for ARC support diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index fe3caac..9b96cff 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -1027,12 +1027,12 @@ aarch64_ext_sysins_op (const aarch64_operand *self ATTRIBUTE_UNUSED, default: assert (0); return 0; } - for (i = 0; sysins_ops[i].template != NULL; ++i) + for (i = 0; sysins_ops[i].name != NULL; ++i) if (sysins_ops[i].value == value) { info->sysins_op = sysins_ops + i; DEBUG_TRACE ("%s found value: %x, has_xt: %d, i: %d.", - info->sysins_op->template, + info->sysins_op->name, (unsigned)info->sysins_op->value, info->sysins_op->has_xt, i); return 1; diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index 9880142..c6ab4b2 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -2667,7 +2667,7 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc, case AARCH64_OPND_SYSREG_DC: case AARCH64_OPND_SYSREG_IC: case AARCH64_OPND_SYSREG_TLBI: - snprintf (buf, size, "%s", opnd->sysins_op->template); + snprintf (buf, size, "%s", opnd->sysins_op->name); break; case AARCH64_OPND_BARRIER: |