This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Don't loose compilation directory in Dwarf2 line-tables
- From: Jason Molenda <jason-swarelist at molenda dot com>
- To: Frederic RISS <frederic dot riss at st dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Thu, 13 Apr 2006 12:58:45 -0700
- Subject: Re: [RFC] Don't loose compilation directory in Dwarf2 line-tables
- References: <1144927446.14807.561.camel@crx549.cro.st.com>
Frederic,
For what it's worth, I fixed the same bug yesterday. Our changes
are similar - in dwarf2_start_subfile I used this code at the end
of the function:
/* APPLE LOCAL: If FILENAME isn't an absolute path and DIRNAME is either
NULL or a relative path, prepend COMP_DIR on there to get an absolute
path. */
if (!IS_ABSOLUTE_PATH (filename) && dirname == NULL)
dirname = comp_dir;
else
if (!IS_ABSOLUTE_PATH (filename) && !IS_ABSOLUTE_PATH (dirname))
{
dirname = concat (comp_dir, SLASH_STRING, dirname, (char *) NULL);
make_cleanup (xfree, dirname);
}
start_subfile (filename, dirname);
do_cleanups (clean);
(with 'cleanup' initialized to a null_cleanup at the top of the file,
naturally.)
J