This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Add aarch64-linux in supports_get_siginfo_type
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 24 Jun 2015 14:39:36 +0100
- Subject: Re: [PATCH 2/2] Add aarch64-linux in supports_get_siginfo_type
- Authentication-results: sourceware.org; auth=none
- References: <1434971017-22494-1-git-send-email-yao dot qi at linaro dot org> <1434971017-22494-2-git-send-email-yao dot qi at linaro dot org> <558A8A4B dot 5090103 at redhat dot com> <86ioadqlmd dot fsf at gmail dot com>
On 06/24/2015 02:30 PM, Yao Qi wrote:
>>
>> though at the pace this is taking, it'd probably be better to register
>> linux_get_siginfo_type as default for all Linux archs (in
>> linux-tdep.c:linux_init_abi),
>> and have archs whoch kernel/ABI uses the non-generic siginfo layout install a
>> custom get_siginfo_type version. The supports_get_siginfo_type
>> testsuite function
>> would then return true for [istarget "*-*-linux*"]. The testsuite
>> would then help
>> show which archs would those be.
>
> Change like this may cause some fails for some linux targets which need
> their custom get_siginfo_type implementations.
Right, that's how I was thinking the tests would help. As is currently,
arch maintainers miss that the feature even exists.
> Here is a patch below,
> I rerun siginfo-obj.exp and siginfo-thread.exp on aarch64/arm/x86_64 linux.
Thanks.
> From 476653a2990b4ebfac806b0da6ffa24b5672ece9 Mon Sep 17 00:00:00 2001
> From: Yao Qi <yao.qi@linaro.org>
> Date: Fri, 19 Jun 2015 14:50:33 +0100
> Subject: [PATCH] Call set_gdbarch_get_siginfo_type in linux_init_abi
>
> linux_get_siginfo_type is installed to many linux gdbarch. This patch
> is to move this to a common area linux-tdep.c:linux_init_abi, so that
> linux_get_siginfo_type is installed to every linux gdbarch. If some
> linux gdbarch needs its own version, please override it in
> $ARCH_linux_init_abi. In the testsuite, we enable siginfo related
> tests for all linux targets.
(Or if you need a quick fix, set it to NULL in that particular arch's
gdbarch init function.)
Looks good to me. Thanks for doing this.
--
Pedro Alves