This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: ping: [patch 3/6] PIE: Fix occasional error attaching i686 binary
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 5 Jul 2010 10:18:10 -0700
- Subject: Re: ping: [patch 3/6] PIE: Fix occasional error attaching i686 binary
- References: <20100329161730.GB2940@host0.dyn.jankratochvil.net> <20100609150841.GC7183@host0.dyn.jankratochvil.net> <20100629185413.GT2595@adacore.com> <20100704101806.GC6875@host0.dyn.jankratochvil.net>
> gdb/
> 2010-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
> Joel Brobecker <brobecker@adacore.com>
>
> * auxv.c (memory_xfer_auxv): Update attach comment.
> * solib-svr4.c (svr4_special_symbol_handling): Remove the call to
> svr4_relocate_main_executable.
> (svr4_solib_create_inferior_hook): Make the call to
> svr4_relocate_main_executable unconditional.
>
> gdb/testsuite/
> 2010-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.base/attach-pie-misread.exp, gdb.base/attach-pie-misread.c: New.
> * gdb.base/break-interp.exp (reach, test_core, test_ld): Require each
> displacement message exactly once.
OK - just one ooopsie:
> --- a/gdb/auxv.c
> +++ b/gdb/auxv.c
> @@ -209,7 +209,14 @@ memory_xfer_auxv (struct target_ops *ops,
>
> /* ld_so_xfer_auxv is the only function safe for virtual executables being
> executed by valgrind's memcheck. As using ld_so_xfer_auxv is problematic
> - during inferior startup GDB does call it only for attached processes. */
> + during inferior startup as ld.so symbol tables are not yet relocated GDB
> + calls ld_so_xfer_auxv only for attached processes. */
> +
> + /* ld_so_xfer_auxv is the only function safe for virtual executables being
> + executed by valgrind's memcheck. Using ld_so_xfer_auxv during inferior
> + startup is problematic, because ld.so symbol tables have not yet been
> + relocated. So GDB uses this function only when attaching to a process.
> + */
You forgot to remove the old version of the comment. :-)
--
Joel