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] PR gdb/10952: install gdbarch_skip_solib_resolver on AMD64 GNU/Linux


> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 03 May 2012 16:30:11 +0100
> 
> PR gdb/10952 is about single stepping into functions being very slow
> when LD_BIND_NOW is not set.  What this means is that stepping over
> resolving PLTs is slow.  It turns out that for for some reason, which
> I couldn't determine from looking at the archives/history, the AMD64
> GNU/Linux port doesn't install glibc_skip_solib_resolver as
> gdbarch_skip_solib_resolver callback, meaning that GDB needs to issue
> many single-steps to get past the resolver.  This looks like an
> oversight.
> 
> Is there a reason we shouldn't install this?

I can't think of any, so if it helps speeding things up, go ahead!

> 2012-05-03  Pedro Alves  <palves@redhat.com>
> 
> 	* amd64-linux-tdep.c: Include glibc-tdep.h.
> 	(amd64_linux_init_abi): Install glibc_skip_solib_resolver as
> 	gdbarch_skip_solib_resolver callback.
> ---
>  gdb/amd64-linux-tdep.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
> index da22c1c..acc7303 100644
> --- a/gdb/amd64-linux-tdep.c
> +++ b/gdb/amd64-linux-tdep.c
> @@ -38,6 +38,7 @@
>  #include "amd64-tdep.h"
>  #include "solib-svr4.h"
>  #include "xml-syscall.h"
> +#include "glibc-tdep.h"
>  
>  #include "features/i386/amd64-linux.c"
>  #include "features/i386/amd64-avx-linux.c"
> @@ -1342,6 +1343,9 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
>    /* GNU/Linux uses SVR4-style shared libraries.  */
>    set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
>  
> +  /* GNU/Linux uses the dynamic linker included in the GNU C Library.  */
> +  set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
> +
>    /* Install supported register note sections.  */
>    set_gdbarch_core_regset_sections (gdbarch, amd64_linux_regset_sections);


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