This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] add -foverride-comp-dir


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?


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]