diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-10-12 11:28:38 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-10-12 11:28:38 +0100 |
commit | 0badd99faf8cb1a20ade36e94d3f74b9e6f65cd1 (patch) | |
tree | 2238ad294e47ea6956b17b4bb273a26402431260 /gdb/arch/aarch64-insn.c | |
parent | dfaffe9d93dec5c23cc71b74789221ce97a132ef (diff) | |
download | gdb-0badd99faf8cb1a20ade36e94d3f74b9e6f65cd1.zip gdb-0badd99faf8cb1a20ade36e94d3f74b9e6f65cd1.tar.gz gdb-0badd99faf8cb1a20ade36e94d3f74b9e6f65cd1.tar.bz2 |
Use visitor in aarch64_relocate_instruction
Nowadays, the instruction decodings and handling are mixed together
inside aarch64_relocate_instruction. The patch decouples instruction
decoding and instruction handling by using visitor pattern. That is,
aarch64_relocate_instruction decode instructions and visit each
instruction by different visitor methods. Each visitor defines the
concrete things to different instructions. Fast tracepoint instruction
relocation and displaced stepping can define their own visitors,
sub-class of struct aarch64_insn_data.
gdb/gdbserver:
2015-10-12 Yao Qi <yao.qi@linaro.org>
* linux-aarch64-low.c (struct aarch64_insn_data): New.
(struct aarch64_insn_visitor): New.
(struct aarch64_insn_relocation_data): New.
(aarch64_ftrace_insn_reloc_b): New function.
(aarch64_ftrace_insn_reloc_b_cond): Likewise.
(aarch64_ftrace_insn_reloc_cb): Likewise.
(aarch64_ftrace_insn_reloc_tb): Likewise.
(aarch64_ftrace_insn_reloc_adr): Likewise.
(aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
(aarch64_ftrace_insn_reloc_others): Likewise.
(visitor): New.
(aarch64_relocate_instruction): Use visitor.
Diffstat (limited to 'gdb/arch/aarch64-insn.c')
0 files changed, 0 insertions, 0 deletions