This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] add -foverride-comp-dir
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Geoffrey Keating <geoffk at apple dot com>
- Cc: Dan Aloni <da-x at monatomic dot org>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 01 Oct 2006 13:06:07 -0700
- Subject: Re: [PATCH] add -foverride-comp-dir
- References: <20060926135209.GA3599@localdomain> <email@example.com>
Geoffrey Keating wrote:
When debug information is used, we need to make sure that that the
result binaries are identical if compiled from the same source between
several developers working from different directories, and also to be
able to look at core files from gdb with proper (i.e. path-relative)
source code lookup. By simply passing -foverride-comp-dir=. to gcc
after this feature is patched in, we are able to achieve our goals.
Would it be better to simply have a -fno-comp-dir flag, to omit this
information entirely from the DWARF output?
The other motivation for this kind of feature is so that you can ship
libraries in both object and source form, and make it easy for users to
refer to the source code in the debugger. You need to make absolute
paths into relative ones. Daniel, does GDB already have the ability to
do the substitution? In other words, does Dan's functionality provide
any additional leverage for that use case?
(650) 331-3385 x713