This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Use visitor in aarch64_relocate_instruction


*** TEST RESULTS FOR COMMIT 0badd99faf8cb1a20ade36e94d3f74b9e6f65cd1 ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 0badd99faf8cb1a20ade36e94d3f74b9e6f65cd1

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]