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: [testsuite patch] Skip py-unwind.exp on x86_64 -m32


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 (齐尧)


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