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: Tue, 29 Jun 2010 11:54:13 -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>
> gdb/
> 2010-03-29 Jan Kratochvil <jan.kratochvil@redhat.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-03-29 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.
This patch looks OK to me.
> /* 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. */
Style: "As [...] as"... Suggest instead:
Using ld_so_xfer_auxv during inferior startup is problematic, because
ld.so symbol tables have not yet relocated yet. So GDB uses this function
only when attaching to a process.
--
Joel