From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6253 invoked by alias); 8 Jul 2009 18:30:26 -0000 Received: (qmail 6200 invoked by uid 22791); 8 Jul 2009 18:30:23 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_55,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hel.is.scarlet.be (HELO hel.is.scarlet.be) (193.74.71.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jul 2009 18:30:15 +0000 Received: from [172.17.1.10] (ip-81-11-241-231.dsl.scarlet.be [81.11.241.231]) by hel.is.scarlet.be (8.14.2/8.14.2) with ESMTP id n68ITvQk028788; Wed, 8 Jul 2009 20:29:58 +0200 Subject: Re: How to fix solib path name? From: Danny Backx Reply-To: danny.backx@scarlet.be To: Pedro Alves Cc: gdb-patches@sourceware.org In-Reply-To: <200907081742.27876.pedro@codesourcery.com> References: <1247063678.3870.59.camel@pavilion> <200907081556.09821.pedro@codesourcery.com> <200907081742.27876.pedro@codesourcery.com> Content-Type: text/plain Date: Wed, 08 Jul 2009 20:46:00 -0000 Message-Id: <1247077806.3870.88.camel@pavilion> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-DCC-scarlet.be-Metrics: hel 20001; Body=3 Fuz1=3 Fuz2=3 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: 2009-07/txt/msg00270.txt.bz2 On Wed, 2009-07-08 at 17:42 +0100, Pedro Alves wrote: > Going back to the previous hints, and answering myself: > > On Wednesday 08 July 2009 15:56:09, Pedro Alves wrote: > > > No \Windows\coredll.dll > > On Wednesday 08 July 2009 15:56:09, Pedro Alves wrote: > > You'll have to issue with backslashes on linux though. I don't > > remember if GDB head takes care of converting those to forward > > slashes for you or not. > > > > This bit of code in solib.c:solib_find appears to indicate that > if the dll isn't found in the sysroot, then it should be found in > the solib-search-path: > > /* If not found, next search the solib_search_path (if any) for the basename > only (ignoring the path). This is to allow reading solibs from a path > that differs from the opened path. */ > if (found_file < 0 && solib_search_path != NULL) > found_file = openp (solib_search_path, OPF_TRY_CWD_FIRST, > lbasename (in_pathname), O_RDONLY | O_BINARY, > &temp_pathname); > > > but, lbasename on a linux box isn't considering '\' a path separator. The combination of sysroot and solib-search-path *and* a fix to turn '\' into '/' inside gdbserver does the trick. Should that translation then be put in gdbserver ? Are such details of the gdb/gdbserver protocol documented at all ? Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info