This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Source directory trees not in build location
- From: Paul Koning <pkoning at equallogic dot com>
- To: gdb at sources dot redhat dot com
- Date: Tue, 28 Mar 2006 17:17:46 -0500
- Subject: Source directory trees not in build location
We have a large source tree with many directories. When the system is
built that tree appears in one place in the namespace; then the build
results are saved in "good builds" directories, one per good build up
to whatever we can save.
The result is that source files are not where they were at build time.
GDB can handle this on a per-directory basis with the "directory"
command, but when you have on the order of a hundred directories that
is excessively painful.
I made a local patch to add a source path name rewriting rule. That
allows a substring of the source path name to be replaced by some
different substring. The current implementation is simplistic -- it
allows exactly one substitution rule, and the matching is exact string
match. It would be possible to allow multiple rules, and probably
also fancier mechanisms like regexps. That wasn't necessary for our
application.
Is this of interest to the greater GDB?
paul