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: [ppc64le patch v3] Use skip_entrypoint for skip_trampoline_code


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


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