From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28284 invoked by alias); 6 Apr 2013 15:04:24 -0000 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 Received: (qmail 28257 invoked by uid 89); 6 Apr 2013 15:04:23 -0000 X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 06 Apr 2013 15:04:19 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MKU00E009NYE300@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Sat, 06 Apr 2013 18:03:41 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MKU00E2V9U578A0@a-mtaout21.012.net.il>; Sat, 06 Apr 2013 18:03:41 +0300 (IDT) Date: Sun, 07 Apr 2013 03:58:00 -0000 From: Eli Zaretskii Subject: Re: one week to gdb-7.6 release? In-reply-to: <5160298B.2080903@redhat.com> To: Pedro Alves Cc: mark.kettenis@xs4all.nl, brobecker@adacore.com, gdb-patches@sourceware.org, jan.kratochvil@redhat.com, ralf.corsepius@rtems.org, vapier@gentoo.org, joel.sherrill@oarcorp.com Reply-to: Eli Zaretskii Message-id: <83zjxbd7la.fsf@gnu.org> References: <20130320160032.GC5447@adacore.com> <83vc8myoyb.fsf@gnu.org> <83ehf64cfs.fsf@gnu.org> <20130323162534.GI5447@adacore.com> <834ng23soj.fsf@gnu.org> <20130325151825.GJ5447@adacore.com> <83k3ov1mo0.fsf@gnu.org> <201303251627.r2PGRheU015551@glazunov.sibelius.xs4all.nl> <83ip4f1knw.fsf@gnu.org> <5160298B.2080903@redhat.com> X-SW-Source: 2013-04/txt/msg00158.txt.bz2 > Date: Sat, 06 Apr 2013 14:56:27 +0100 > From: Pedro Alves > CC: Mark Kettenis , brobecker@adacore.com, > gdb-patches@sourceware.org, jan.kratochvil@redhat.com, > ralf.corsepius@rtems.org, vapier@gentoo.org, joel.sherrill@oarcorp.com > > On 03/25/2013 04:58 PM, Eli Zaretskii wrote: > >> From: Mark Kettenis > >>> From: Eli Zaretskii > >>> I think on Posix platforms, the way to convert argv[0] to an absolute > >>> file name is to search PATH. > >> > >> Not really; argv[0] can be set to anything. It's just convention that > >> it gets set to the name of the program being executed. > > > > Well, if it isn't set to the name of the program, and its leading > > directory doesn't name the directory where the real GDB executable > > lives, then relocation of directories simply cannot work, and > > shouldn't be expected to. I think we should only care about the use > > cases where the pre-conditions for relocation do exist. > > Replying mainly for the archives. On Linux, we can always > readlink /proc/self/exe to figure out the full program path. > That steps out of Posix, of course. Ideas for other platforms can be taken from the gnulib progreloc.c file.