This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [testsuite patch] Skip py-unwind.exp on x86_64 -m32
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Wed, 20 Jul 2016 12:20:28 +0100
- Subject: Re: [testsuite patch] Skip py-unwind.exp on x86_64 -m32
- Authentication-results: sourceware.org; auth=none
- References: <20160717143003.GA12147@host1.jankratochvil.net> <CAH=s-PNiyGeCnW4gL9FjycVun2o4Owc_Q-Sdpx-NiWOVvi-qyQ@mail.gmail.com> <20160718113348.GA25789@host1.jankratochvil.net> <CAH=s-PNpb0m4w+Qp775oWyg4DHkB9Gio1Lq0jeZMmhPGEJtb6A@mail.gmail.com> <ed2c05b4-a311-9605-fcd8-cd42473114eb@redhat.com>
On Tue, Jul 19, 2016 at 7:04 PM, Pedro Alves <palves@redhat.com> wrote:
> On 07/19/2016 11:06 AM, Yao Qi wrote:
>
>> IMO, it is wrong that py-unwind.py creates an x86_64 specific unwinder.
>
> I find the "wrong" qualifier a bit too strong, since it is probably
> not possible to make this sort of test completely arch-independent.
>
At least py-unwinder.py should create unwinder for each arch, or we should
rename it to py-unwinder-$arch.py, as you said.
>> py-unwind.py should create a unwinder instance according to the arch if the
>> arch is supported. On i386, or other archs, like arm, mips, py-unwind.py
>> can error, and py-unwind.exp knows unwinder is not created successfully,
>> and mark the test unsupported. If people want to extend py-unwind.py for
>> their archs, they can modify py-unwind.py to create an unwinder instance
>> for their own arch.
>>
>>> The problem here is that py-unwind.exp thinks that it runs on arch x86_64 but
>>> it runs on arch i386.
>>>
>>> Even if py-unwind.exp did support i386 it would still FAIL because it would
>>> run the testcase for %rbp/%rsp/%rip.
>>
>> py-unwind.exp does nothing on arch specific thing, so py-unwind.exp shouldn't
>> be aware of the arch difference, but py-unwind.py should.
>>
>
> Looks like py-unwind.c is ABI-specific as well, and that there's not much code
> that can be shared between architectures in py-unwind.py, though. It may be we'd
> end up with separate py-unwind-$arch.py|c files even.
Agreed.
>
> How about we handle this in the .exp file for now and leave something
> more complicated for when the test is first ported to some other
> arch. WDYT?
>
Well, that is fine by me, because I don't plan to port this test to
arm or aarch64
recently.
--
Yao (齐尧)