From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13371 invoked by alias); 7 Jan 2008 17:36:12 -0000 Received: (qmail 13330 invoked by uid 22791); 7 Jan 2008 17:36:12 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Jan 2008 17:35:44 +0000 Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id m07HZWQ3031141 for ; Mon, 7 Jan 2008 09:35:32 -0800 Received: from wa-out-1112.google.com (wahj5.prod.google.com [10.114.236.5]) by zps35.corp.google.com with ESMTP id m07HYEue013253 for ; Mon, 7 Jan 2008 09:35:32 -0800 Received: by wa-out-1112.google.com with SMTP id j5so11605912wah.15 for ; Mon, 07 Jan 2008 09:35:32 -0800 (PST) Received: by 10.114.202.15 with SMTP id z15mr6416078waf.72.1199727330783; Mon, 07 Jan 2008 09:35:30 -0800 (PST) Received: by 10.115.107.7 with HTTP; Mon, 7 Jan 2008 09:35:30 -0800 (PST) Message-ID: Date: Mon, 07 Jan 2008 17:36:00 -0000 From: "Doug Evans" To: "Eli Zaretskii" Subject: Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path st yles Cc: drow@false.org, gdb-patches@sources.redhat.com, ARistovski@qnx.com, gcc-patches@gcc.gnu.org, RMansfield@qnx.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2F6320727174C448A52CEB63D85D11F40A58@nova.ott.qnx.com> <20080106054030.GA10410@caradoc.them.org> X-IsSubscribed: yes 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: 2008-01/txt/msg00114.txt.bz2 On Jan 6, 2008 8:17 PM, Eli Zaretskii wrote: > > Date: Sun, 6 Jan 2008 13:07:25 -0800 > > From: "Doug Evans" > > Cc: drow@false.org, gdb-patches@sources.redhat.com, ARistovski@qnx.com, > > gcc-patches@gcc.gnu.org, RMansfield@qnx.com > > > > What would the option apply to? How would the user know when and when > > not to use it? > > I don't really understand the question. How would the user know when > to use any other option? If they read the documentation and > understand the issues, they will know. I realize the question may sound odd. I asked it because the range to which the option may apply seems vast, whereas the range to which it will be applied (AIUI) seems small, leading to excessive confusion. If I'm mistaken about that then ignore the question. Of course, one might be able to come up with a suitable enough name for the option to mitigate the confusion. I don't know. I'd be curious to see a patch. > > One thing that occurs to me is what if I do "bash$ gdb > > /prog/with/other/path/format"? Will gdb need to know the format > > before the user gets a chance to specify the format? > > No. We were talking about finding sources given file names recorded > in the debug info. Finding the program given the command-line > arguments is not the same problem, and I don't thing GDB uses any of > these macros to do that, or needs to. Perhaps I should have written "gdb prog.with.other.path.format.in.debug.info". :-) As a datapoint, and to give some context for the above, I patched filenames.h to print a message whenever IS_ABSOLUTE_PATH is called. dje@ruffy:~$ ./gdb -nx hello GNU gdb 6.7.50.20080104-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux"... IS_ABSOLUTE_PATH (/home/dje/hello.x32) IS_ABSOLUTE_PATH (/home/dje/hello.x32) IS_ABSOLUTE_PATH (start.S) IS_ABSOLUTE_PATH (../sysdeps/i386/elf/start.S) IS_ABSOLUTE_PATH (crti.S) IS_ABSOLUTE_PATH (/build/buildd/glibc-2.3.6/build-tree/i386-libc/csu/crti.S) IS_ABSOLUTE_PATH (hello.c) IS_ABSOLUTE_PATH (hello.c) IS_ABSOLUTE_PATH (crtn.S) IS_ABSOLUTE_PATH (/build/buildd/glibc-2.3.6/build-tree/i386-libc/csu/crtn.S) (gdb)