From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4142 invoked by alias); 29 Jun 2010 18:54:27 -0000 Received: (qmail 4130 invoked by uid 22791); 29 Jun 2010 18:54:26 -0000 X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_00,KAM_STOCKTIP X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jun 2010 18:54:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E407F2BAAEE; Tue, 29 Jun 2010 14:54:19 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fJkAEWE1l+1K; Tue, 29 Jun 2010 14:54:19 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2EF872BAAAD; Tue, 29 Jun 2010 14:54:18 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 95EDCF5895; Tue, 29 Jun 2010 11:54:13 -0700 (PDT) Date: Tue, 29 Jun 2010 18:54:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: ping: [patch 3/6] PIE: Fix occasional error attaching i686 binary Message-ID: <20100629185413.GT2595@adacore.com> References: <20100329161730.GB2940@host0.dyn.jankratochvil.net> <20100609150841.GC7183@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100609150841.GC7183@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00681.txt.bz2 > gdb/ > 2010-03-29 Jan Kratochvil > > * 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 > > * 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