public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	       Sergio Durigan Junior <sergiodj@redhat.com>
Subject: Re: [testsuite patch] Skip py-unwind.exp on x86_64 -m32
Date: Tue, 19 Jul 2016 18:04:00 -0000	[thread overview]
Message-ID: <ed2c05b4-a311-9605-fcd8-cd42473114eb@redhat.com> (raw)
In-Reply-To: <CAH=s-PNpb0m4w+Qp775oWyg4DHkB9Gio1Lq0jeZMmhPGEJtb6A@mail.gmail.com>

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

  reply	other threads:[~2016-07-19 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 14:30 Jan Kratochvil
2016-07-18 10:04 ` Yao Qi
2016-07-18 11:34   ` Jan Kratochvil
2016-07-19 10:06     ` Yao Qi
2016-07-19 18:04       ` Pedro Alves [this message]
2016-07-20 11:20         ` Yao Qi
2016-07-20 13:49           ` Pedro Alves
2016-07-20 14:19             ` [commit] " Jan Kratochvil
2016-07-19 19:30     ` Sergio Durigan Junior
2016-07-20 13:48       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed2c05b4-a311-9605-fcd8-cd42473114eb@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=qiyaoltc@gmail.com \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).