From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23456 invoked by alias); 20 Mar 2002 16:10:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23078 invoked from network); 20 Mar 2002 16:09:30 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 20 Mar 2002 16:09:30 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 430203EDC; Wed, 20 Mar 2002 11:09:26 -0500 (EST) Message-ID: <3C98B436.6010809@cygnus.com> Date: Wed, 20 Mar 2002 08:10:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Eli Zaretskii Cc: Joel Brobecker , drow@mvista.com, gdb-patches@sources.redhat.com Subject: Re: [RFC] gdb_realpath causes problems with GVD References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00387.txt.bz2 > On Wed, 20 Mar 2002, Joel Brobecker wrote: > > >> I have a sad news: filename >> completion does not work in the case you mentionned, but this issue is >> not related to my change. I tried with an unmodified GDB, and got the >> same behavior. > > > What version of GDB was that, and what debug info format does your > compiler use? > > >> I also tried without a simple example without any >> symbolic link, and it did not work either. It only completes if we enter >> the filename without the directory prefix, with and without my change. > > > This certainly works for me, at least in GDB 5.1.1 with stabs and DWARF2 > debug info. It doesn't work with COFF debug info, but that's because > COFF doesn't record the leading directories, only the basename. If the auto-configury fails, gdb_realpath() returns xstrdup of the original string. Since 5.1.1 people have been wacking that bit of configury and the corresponding function so that it ``works'' (as in implements realpath() semantics) on more platforms. I think it is that ``wacking'' that has revealed the regression - in 5.1.1 gdb_realpath() on your platform probably wasn't doing anything. Joel's patch makes things slightly better - it stops the basename part from being messed up (what happens if there is no path?) - while neither helping nor hindering the regression. It does need a testcase. Since the completer has regressions, xfullpath() can't be indirectly tested using that -> need to directly test xfullpath() -> need the white-box directory -> stay tuned. Joel, can you please create a testcase along the lines of gdb.base/selftest.exp that tests xfullpath() using gdb. I'll find a directory for you to put it in! -- This just leaves us with the regression. The question here is should the path expansion be disabled or the problems fixed. enjoy, Andrew