This is the mail archive of the gdb-patches@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]

Re: [PATCH 2/2] Add aarch64-linux in supports_get_siginfo_type


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


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