From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16185 invoked by alias); 27 Nov 2001 16:00:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16034 invoked from network); 27 Nov 2001 16:00:12 -0000 Received: from unknown (HELO balder.inter.net.il) (192.114.186.15) by hostedprojects.ges.redhat.com with SMTP; 27 Nov 2001 16:00:12 -0000 Received: from zaretsky ([192.116.55.139]) by balder.inter.net.il (Mirapoint) with ESMTP id BBG90805; Tue, 27 Nov 2001 17:59:54 +0200 (IST) Date: Wed, 14 Nov 2001 15:22:00 -0000 From: "Eli Zaretskii" To: orjan.friberg@axis.com Message-ID: <3405-Tue27Nov2001175932+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: gdb-patches@sources.redhat.com, drow@mvista.com In-reply-to: <3C03AB51.DB27B3D4@axis.com> (message from Orjan Friberg on Tue, 27 Nov 2001 16:03:45 +0100) Subject: Re: [RFC]: Solib search (Was: Re: Cross solib support; continued) Reply-to: Eli Zaretskii References: <3BEAA3A0.586B3046@axis.com> <20011108110955.A12240@nevyn.them.org> <3C03AB51.DB27B3D4@axis.com> X-SW-Source: 2001-11/txt/msg00285.txt.bz2 Message-ID: <20011114152200.b6Qxc0CsUAx5GYWRNW5_5Uj8U_GkgPaf9l9aXp42u7c@z> > Date: Tue, 27 Nov 2001 16:03:45 +0100 > From: Orjan Friberg > > + /* If the search in solib_absolute_prefix failed, and the path name is > + absolute at this point, make it relative. (openp will try and open the > + file according to its absolute path otherwise, which is not what we want.) > + Affects all subsequent searches for this solib. */ > + if (found_file < 0 && IS_DIR_SEPARATOR (in_pathname[0])) > + in_pathname++; This is not how one should test for an absoulte file name portably, and incrementing in_pathname by one is not how you portably make it a relative file name. I suggest to use IS_ABSOLUTE_PATH for the first and this for the second: while (!IS_DIR_SEPARATOR (*in_pathname++)) ; Please note that these portable macros are described in gdbint.texinfo (node "Coding", subsection about portable coding).