aboutsummaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-05-23 10:45:58 +0100
committerYao Qi <yao.qi@linaro.org>2017-06-20 11:34:13 +0100
commit260e831b2914a676b7cc1949e2df94a0732a4078 (patch)
tree9e18f4869aa1ec34f3a0861f94d0833d52620b1d /ld/ldgram.y
parentfdaa7052f666655b3e0b1c64957fbff5a3358294 (diff)
downloadgdb-260e831b2914a676b7cc1949e2df94a0732a4078.zip
gdb-260e831b2914a676b7cc1949e2df94a0732a4078.tar.gz
gdb-260e831b2914a676b7cc1949e2df94a0732a4078.tar.bz2
Use VEC for target_desc.reg_defs
Nowadays, target_desc.reg_defs is a pointer points to a pre-generated array, which is not flexible. This patch changes it from an array to a VEC so that GDBserver can create target descriptions dynamically later. Instead of using pre-generated array, the -generated.c calls VEC_safe_push to add each register to vector. Since target_desc.reg_defs is used in IPA, we need to build common/vec.c for IPA too. gdb/gdbserver: 2017-05-23 Yao Qi <yao.qi@linaro.org> * Makefile.in (IPA_OBJS): Add vec-ipa.o * regcache.c (get_thread_regcache): Use VEC_length. (init_register_cache): Likewise. (regcache_cpy): Likewise. (registers_to_string): Iterate reg_defs via VEC_iterate. (find_regno): Likewise. (find_register_by_number): Use VEC_index. (register_size): Call find_register_by_number. (register_data): Call find_register_by_number. (supply_regblock): Use VEC_length. (regcache_raw_read_unsigned): Likewise. * tdesc.c (init_target_desc): Iterate reg_defs via VEC_iterate. (default_description): Update initializer. (copy_target_description): Don't update field num_registers. * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC. <num_registers>: Remove. gdb: 2017-05-23 Yao Qi <yao.qi@linaro.org> * regformats/regdat.sh: Update generated code.
Diffstat (limited to 'ld/ldgram.y')
0 files changed, 0 insertions, 0 deletions