From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24526 invoked by alias); 8 Jan 2008 16:19:26 -0000 Received: (qmail 24517 invoked by uid 22791); 8 Jan 2008 16:19:26 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Jan 2008 16:19:02 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 94C4D98216; Tue, 8 Jan 2008 16:19:00 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 7261098022; Tue, 8 Jan 2008 16:19:00 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JCHAJ-0006Rz-I1; Tue, 08 Jan 2008 11:18:59 -0500 Date: Tue, 08 Jan 2008 16:19:00 -0000 From: Daniel Jacobowitz To: Aleksandar Ristovski Cc: dje@google.com, gdb-patches@sourceware.org Subject: Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies Message-ID: <20080108161859.GA24533@caradoc.them.org> Mail-Followup-To: Aleksandar Ristovski , dje@google.com, gdb-patches@sourceware.org References: <2F6320727174C448A52CEB63D85D11F40A5E@nova.ott.qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2F6320727174C448A52CEB63D85D11F40A5E@nova.ott.qnx.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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/msg00140.txt.bz2 On Tue, Jan 08, 2008 at 11:09:18AM -0500, Aleksandar Ristovski wrote: > b) Symlinks involved: > b1) Then I tried to make a symlink to another location: > ln -s /tmp /foo/bar/obj > Make /foo/bar/obj my work dir and try: > gcc ../main.cc > It fails to find it (and rightfully so). > The only way I could build it is by using the absolute names. > gcc -c -g /foo/bar/main.cc -o main.o > now DW_AT_comp_dir is not specified and all paths are absolute (so no > problems there). No, try: mkdir -p /foo/bar/real-obj/obj touch /foo/bar/real-obj/main.c rm /foo/bar/obj ln -s /foo/bar/real-obj/obj /foo/bar/obj cd /foo/bar/obj gcc ../main.c The path "/foo/bar/obj/../main.c" is valid. The path "/foo/bar/main.c" is not. I think we should not implement this unless we have a real-world example where it would be necessary. It would require a version of the compiler which outputs different paths in .debug_info and .debug_line for the same file (which is a bug in the compiler, in my opinion!), a Makefile using ".." to find source files, and a source file including another file with the same basename. -- Daniel Jacobowitz CodeSourcery