diff options
author | Paul Brook <paul@codesourcery.com> | 2007-08-18 15:15:39 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2007-08-18 16:15:39 +0100 |
commit | c8aea42ce2c691e4e891476c456f4650d3757810 (patch) | |
tree | 2e4cb7ceb95c3ce97266450ff573e6d60f7ba70d /gcc/dwarf2out.c | |
parent | 9e1d712c405048f18f246c974865777971c8be16 (diff) | |
download | gcc-c8aea42ce2c691e4e891476c456f4650d3757810.zip gcc-c8aea42ce2c691e4e891476c456f4650d3757810.tar.gz gcc-c8aea42ce2c691e4e891476c456f4650d3757810.tar.bz2 |
Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New.
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New.
(CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Include it.
* Makefile.in: Regenerate.
* configure.ac (--with-debug-prefix-map): New.
* configure: Regenerate.
config:
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* mt-gnu (CXXFLAGS_FOR_TARGET): Add
$(DEBUG_PREFIX_CFLAGS_FOR_TARGET).
gcc:
2007-08-18 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* common.opt (-fdebug-prefix-map=): New option.
* opts.c: Include debug.h.
(common_handle_option): Handle -fdebug-prefix-map.
* final.c: Include ggc.h.
(struct debug_prefix_map, debug_prefix_maps, add_debug_prefix_map,
remap_debug_filename): New.
* Makefile.in (final.o, opts.o): Update dependencies.
* debug.h (remap_debug_filename, add_debug_prefix_map): Declare.
* configure.ac: Check for assembler --debug-prefix-map support.
* configure, config.in: Regenerate.
* gcc.c (ASM_MAP): Define conditional on HAVE_AS_DEBUG_PREFIX_MAP.
(ASM_DEBUG_SPEC): Include ASM_MAP.
* doc/install.texi (--with-debug-prefix-map): Document.
* doc/invoke.texi (-fdebug-prefix-map): Document.
* dbxout.c (dbxout_init, dbxout_start_source_file,
dbxout_source_file): Call remap_debug_filename.
* dwarf2out.c (add_comp_dir_attribute, maybe_emit_file,
dwarf2out_start_source_file, dwarf2out_finish): Call
remap_debug_filename.
(file_table_relative_p): Do not check d->emitted_number.
* toplev.c (output_file_directive): Call remap_debug_filename.
* vmsdbgout.c (write_srccorr): Call remap_debug_filename.
* xcoffout.c (xcoffout_source_file): Call remap_debug_filename.
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r127613
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index dc352b1..bfeb544 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10906,7 +10906,7 @@ add_comp_dir_attribute (dw_die_ref die) { const char *wd = get_src_pwd (); if (wd != NULL) - add_AT_string (die, DW_AT_comp_dir, wd); + add_AT_string (die, DW_AT_comp_dir, remap_debug_filename (wd)); } /* Given a tree node describing an array bound (either lower or upper) output @@ -14000,7 +14000,8 @@ maybe_emit_file (struct dwarf_file_data * fd) if (DWARF2_ASM_LINE_DEBUG_INFO) { fprintf (asm_out_file, "\t.file %u ", fd->emitted_number); - output_quoted_string (asm_out_file, fd->filename); + output_quoted_string (asm_out_file, + remap_debug_filename (fd->filename)); fputc ('\n', asm_out_file); } } @@ -14167,7 +14168,7 @@ dwarf2out_start_source_file (unsigned int lineno, const char *filename) dw_die_ref bincl_die; bincl_die = new_die (DW_TAG_GNU_BINCL, comp_unit_die, NULL); - add_AT_string (bincl_die, DW_AT_name, filename); + add_AT_string (bincl_die, DW_AT_name, remap_debug_filename (filename)); } if (debug_info_level >= DINFO_LEVEL_VERBOSE) @@ -14626,7 +14627,7 @@ file_table_relative_p (void ** slot, void *param) { bool *p = param; struct dwarf_file_data *d = *slot; - if (d->emitted_number && !IS_ABSOLUTE_PATH (d->filename)) + if (!IS_ABSOLUTE_PATH (d->filename)) { *p = true; return 0; @@ -14645,7 +14646,7 @@ dwarf2out_finish (const char *filename) /* Add the name for the main input file now. We delayed this from dwarf2out_init to avoid complications with PCH. */ - add_name_attribute (comp_unit_die, filename); + add_name_attribute (comp_unit_die, remap_debug_filename (filename)); if (!IS_ABSOLUTE_PATH (filename)) add_comp_dir_attribute (comp_unit_die); else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL) |