Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: jan.kratochvil@redhat.com (Jan Kratochvil)
Cc: gdb-patches@sourceware.org
Subject: Re: [ppc64le patch v3] Use skip_entrypoint for skip_trampoline_code
Date: Tue, 15 Sep 2015 16:55:00 -0000	[thread overview]
Message-ID: <20150915165514.B37A22209@oc7340732750.ibm.com> (raw)
In-Reply-To: <20150915165019.GA28110@host1.jankratochvil.net> from "Jan Kratochvil" at Sep 15, 2015 06:50:19 PM

Jan Kratochvil wrote:
> On Tue, 15 Sep 2015 18:39:17 +0200, Ulrich Weigand wrote:
> > This is OK.
> 
> Thanks for the ppc64le arch review but I am not sure if it is also approval of
> the coding style which I asked about (not specifically you) by:
> 
> On Mon, 07 Sep 2015 22:47:20 +0200, Jan Kratochvil wrote:
> # Currently gdbarch_skip_entrypoint() has been called in skip_prologue_sal() and
> # fill_in_stop_func() but that is not enough.  I believe
> # gdbarch_skip_entrypoint() should be called after every
> # gdbarch_skip_trampoline_code(), shouldn't it?
> # 
> # The attached patch is a bit hack but I am not sure what is a clean solution.
> # Maybe create a gdbarch_skip_trampoline_code() wrapper function calling also
> # gdbarch_skip_entrypoint() and forbid calling gdbarch_skip_trampoline_code()
> # directly?
> 
> I did not want to refactor it before asking as there are too many
> possibilities how to do it and I expect I would not guess the right one.
> 
> OTOH the refactorization can be also considered a future task, if you mean it
> that way.

Actually, I thought it was fine to have this just be PowerPC-specific.

The need to skip entrypoints in skip_trampoline_code is only due to the
quite PowerPC-specific dynamic linker optimization to redirect the PLT
slot to the local entry point.  I'm not sure if any other target that may
want to use the skip_entrypoint logic in the future will have the same
requirement, so it seemed preferable to have that platform-specific.

In any case, it is probably better to wait with refactoring this into
common code until such time as there actually *is* a second platform
that uses skip_entrypoint, so we're clearer about the actual requirements.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2015-09-15 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 20:47 [ppc64le] " Jan Kratochvil
2015-09-07 22:01 ` [ppc64le patch v2] " Jan Kratochvil
2015-09-10 15:11   ` [ping for Cc] " Jan Kratochvil
2015-09-10 21:17   ` [ppc64le patch v3] " Jan Kratochvil
2015-09-15 16:39     ` Ulrich Weigand
2015-09-15 16:50       ` Jan Kratochvil
2015-09-15 16:55         ` Ulrich Weigand [this message]
2015-09-15 17:10           ` [commit] " Jan Kratochvil

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=20150915165514.B37A22209@oc7340732750.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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