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: [PATCH 3/3 v2] Process record support for PowerPC


Wei-cheng Wang wrote:

>    I thought skip-trampoline is used to find the target address for
>    inserting step-resume breakpoint, so it doesn't make sense for
>    reverse-stepping, because we are just stepping from the target address.
>    And for forward-stepping, when we reach the very first instruction of
>    trampoline code, we can just skip the resolving code by inserting
>    a step-resume breakpoint, so we don't have to step through the resolving
>    code and check whether we are in the middle of trampoline code.
> 
>    in_dynsym_resolve_code is used to check whether we are in (the middle of)
>    the resolving code, so we can keep going to step though the resolving code.
>    Therefor I thought in_dynsym_resolve_code is the proper place to implement.
> 
>    Since skip-trampoline-code had implemented the plt-stub pattern-match code
>    we need, by calling it in in-dynsym-resolve-code, we don't need to have
>    duplicate pattern-match code in both functions.

Well, on other platforms skip_trampoline also works when the PC is in the
middle of the trampoline instead of the beginning, so it doesn't hurt anyway
to make PowerPC match that behavior.  In general, skip_trampoline is supposed
to handle the linker-generated short stubs, while in_dynsym_resolve_code is
supposed to handle the main dynamic linker code itself.  Of course that's
not always a strict distinction, but I still prefer this second patch.

> 2014-12-06  Wei-cheng Wang  <cole945@gmail.com>
> 
> 	* ppc-linux-tdep.c (ppc_skip_trampoline_code):
> 	Scan PLT stub backward for reverse debugging.
> 	* ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.

This is OK.

Thanks,
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]