diff options
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rwxr-xr-x | gdb/regformats/regdat.sh | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 19882f0..c50afec 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-09-05 Yao Qi <yao.qi@linaro.org> + + * regformats/regdat.sh: Adjust code order. + 2017-09-05 Simon Marchi <simon.marchi@ericsson.com> * expprint.c (dump_subexp_body_standard): Use constant format diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh index 651f703..2c764cd 100755 --- a/gdb/regformats/regdat.sh +++ b/gdb/regformats/regdat.sh @@ -123,6 +123,15 @@ while do_read do if test "${type}" = "name"; then name="${entry}" + + echo "const struct target_desc *tdesc_${name};" + echo "" + echo "void" + echo "init_registers_${name} (void)" + echo "{" + echo " static struct target_desc tdesc_${name}_s;" + echo " struct target_desc *result = &tdesc_${name}_s;" + echo "static struct reg regs_${name}[] = {" continue elif test "${type}" = "xmltarget"; then @@ -169,14 +178,6 @@ fi echo cat <<EOF -const struct target_desc *tdesc_${name}; - -void -init_registers_${name} (void) -{ - static struct target_desc tdesc_${name}_s; - struct target_desc *result = &tdesc_${name}_s; - result->reg_defs = regs_${name}; result->num_registers = sizeof (regs_${name}) / sizeof (regs_${name}[0]); |