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: one week to gdb-7.6 release?


> Date: Sat, 06 Apr 2013 14:56:27 +0100
> From: Pedro Alves <palves@redhat.com>
> CC: Mark Kettenis <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
> 
> On 03/25/2013 04:58 PM, Eli Zaretskii wrote:
> >> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> >>> From: Eli Zaretskii <eliz@gnu.org>
> >>> 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.


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