[testsuite patch] Skip py-unwind.exp on x86_64 -m32

Pedro Alves palves@redhat.com
Tue Jul 19 18:04:00 GMT 2016


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.

> 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.  

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?

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list