From: Andrew Pinski <pinskia@gmail.com>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: Richard Sandiford <richard.sandiford@arm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [PATCH] testsuite, Darwin: Add support for Mach-O function body scans.
Date: Fri, 27 Oct 2023 15:44:14 -0700 [thread overview]
Message-ID: <CA+=Sn1kndjCpd_sEp7axXSVGwi-C=MHKgPRDd6VmYe+X9dW6xg@mail.gmail.com> (raw)
In-Reply-To: <4EA34295-8D2A-4856-8F54-3ADACC915E68@sandoe.co.uk>
On Fri, Oct 27, 2023 at 4:00 AM Iain Sandoe <iain@sandoe.co.uk> wrote:
>
> Hi Richard,
>
> > On 26 Oct 2023, at 21:00, Iain Sandoe <iain@sandoe.co.uk> wrote:
>
> >> On 26 Oct 2023, at 20:49, Richard Sandiford <richard.sandiford@arm.com> wrote:
> >>
> >> Iain Sandoe <iains.gcc@gmail.com> writes:
> >>> This was written before Thomas' modification to the ELF-handling to allow
> >>> a config-based change for target details. I did consider updating this
> >>> to try and use that scheme, but I think that it would sit a little
> >>> awkwardly, since there are some differences in the start-up scanning for
> >>> Mach-O. I would say that in all probability we could improve things but
> >>> I'd like to put this forward as a well-tested initial implementation.
> >>
> >> Sorry, I would prefer to extend the existing function instead.
> >> E.g. there's already some divergence between the Mach-O version
> >> and the default version, in that the Mach-O version doesn't print
> >> verbose messages. I also don't think that the current default code
> >> is so watertight that it'll never need to be updated in future.
> >
> > Fair enough, will explore what can be done (as I recall last I looked the
> > primary difference was in the initial start-up scan).
>
> I’ve done this as attached.
>
> For the record, when doing it, it gave rise to the same misgivings that led
> to the separate implementation before.
>
> * as we add formats and uncover asm oddities, they all need to be handled
> in one set of code, IMO it could be come quite convoluted.
>
> * now making a change to the MACH-O code, means I have to check I did not
> inadvertently break ELF (and likewise, in theory, an ELF change should check
> MACH-O, but many folks do/can not do that).
>
> Maybe there’s some half-way-house where code can usefully be shared without
> those down-sides.
There is already gcc.test-framework which seems like a good place to
put a test for both formats so when someone changes the function, they
could run that testsuite to make sure it is still working for the
other format.
(Note I am not saying you should add it as part of this patch but it
seems like that would be the perfect place for it.)
Thanks,
Andrew
>
> Anyway, to make progress, is the revised version OK for trunk? (tested on
> aarch64-linux and aarch64-darwin).
> thanks
> Iain
>
>
>
next prev parent reply other threads:[~2023-10-27 22:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 19:23 Iain Sandoe
2023-10-26 19:49 ` Richard Sandiford
2023-10-26 20:00 ` Iain Sandoe
2023-10-27 11:00 ` Iain Sandoe
2023-10-27 22:44 ` Andrew Pinski [this message]
2023-11-05 22:11 ` Richard Sandiford
2023-11-06 7:59 ` Iain Sandoe
2023-11-06 10:57 ` Richard Sandiford
2023-11-23 9:02 ` Christophe Lyon
2023-11-23 9:09 ` Iain Sandoe
2023-11-23 9:22 ` Christophe Lyon
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='CA+=Sn1kndjCpd_sEp7axXSVGwi-C=MHKgPRDd6VmYe+X9dW6xg@mail.gmail.com' \
--to=pinskia@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=iain@sandoe.co.uk \
--cc=richard.sandiford@arm.com \
--cc=thomas@codesourcery.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).