From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11933 invoked by alias); 16 Dec 2010 10:26:28 -0000 Received: (qmail 11924 invoked by uid 22791); 16 Dec 2010 10:26:28 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Dec 2010 10:26:23 +0000 Received: from localhost (gengis.u-strasbg.fr [130.79.200.60]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id oBGAQFJq055467 ; Thu, 16 Dec 2010 11:26:15 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from gw-ics.u-strasbg.fr (gw-ics.u-strasbg.fr [130.79.210.225]) by webmail.u-strasbg.fr (Horde MIME library) with HTTP; Thu, 16 Dec 2010 11:26:14 +0100 Message-ID: <20101216112614.fa2rmsu5eso0o0ok@webmail.u-strasbg.fr> Date: Thu, 16 Dec 2010 10:26:00 -0000 From: Pierre Muller To: gdb-patches@sourceware.org Cc: Yoshinori Toshima Subject: Re: Please add code to pick up SOLIB_SEARCH_PATH env var. References: <4D09DB33.902@oracle.com> In-Reply-To: <4D09DB33.902@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.5) / FreeBSD-6.2 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-12/txt/msg00332.txt.bz2 I was wondering if your patch would work if the environment variable had several entries, like; SOLIB_SEARCH_PATH=3D/myprefix/lib:/myprefix/lib64 Does access return 0 if you give it the whole evironment variable, or should you test the coponents one by one? Pierre Muller > Yoshinori Toshima a =C3=A9crit=C2=A0: > > Hello, > > I have a small enhancement request for GDB to make it easier to > use when debugging core file from other systems which have > different libraries. > > Description: > When debugging a core file from released product, it is convenient > to have gdb use shared libraries in a directory which contains the > libraries and executable taken from the system which caused the > crash. It is possible to perform this by gdb command "set > solib-search-path ". This means some commands are required > after starting gdb. If we can set solib-search-path at gdb startup, > it is easier to use. This is useful when we use GDB programmatically. > > HP-UX port of GDB has this feature via env var GDB_SHLIB_PATH. > GDB does not have the feature yet, though it mentions SOLIB_SEARCH_PATH > in solib.c. > > I changed solib.c to pick up SOLIB_SEARCH_PATH at startup and set > it to solib_search_path in solib.c initialization. It worked as > expected. > > Attached solib-patch.diff is based on solib.c in gdb 7.2. > > ChangeLog entry: > 2010-12-16 Yoshinori Toshima > > * solib.c: Pick up SOLIB_SEARCH_PATH env var to set solib-search-path at > startup. > > Regards, > Yoshinori Toshima >