This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC][PATCH 09/15] gdb: Add relocate instruction helpers
- From: "Wallin, Henrik" <Henrik dot Wallin at windriver dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 29 Oct 2015 17:51:05 +0000
- Subject: RE: [RFC][PATCH 09/15] gdb: Add relocate instruction helpers
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1444820235 dot git dot henrik dot wallin at windriver dot com> <cover dot 1444820235 dot git dot henrik dot wallin at windriver dot com> <b3dfc6c9e6fdba064a0925c137723e63d3103362 dot 1444820235 dot git dot henrik dot wallin at windriver dot com>,<86mvv4zhfj dot fsf at gmail dot com>
2015-10-27 12:20 GMT+01:00 Yao Qi <qiyaoltc@gmail.com>:
> henrik.wallin@windriver.com writes:
>
>> The functions are used both when validating an instruction
>> when the users sets a fast tracepoint and when relocating
>> an instruction when gdbserver/ipa installs the jump pad.
>>
>> Currently all PC relative instructions are considered
>> not relocatable.
>>
>> Futher improvements can be made by rewriting some of those
>> instructions with alternative instructions.
>>
>> gdb/ChangeLog:
>>
>> * arm-tdep.c : Add relocate functionality to be used by fast
>> tracepoint support.
>
> You are relocating instructions in GDB side, which uses qRelocInsn
> packet. Why don't you relocate them in GDBserver side? Search
> aarch64_relocate_instruction in gdbserver/linux-aarch64-low.c, and you
> may have some clues from it.
Thanks for looking at the patches. I will check arm64 code and see if it can be moved to gdbserver side.
thanks,
/ Henrik