From 5f1f2de5fe3f87b056e802102fcb975979845eff Mon Sep 17 00:00:00 2001 From: jsm28 Date: Sat, 18 Aug 2007 15:15:39 +0000 Subject: 2007-08-18 Paul Brook Joseph Myers * 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 Joseph Myers * mt-gnu (CXXFLAGS_FOR_TARGET): Add $(DEBUG_PREFIX_CFLAGS_FOR_TARGET). gcc: 2007-08-18 Paul Brook Joseph Myers * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127613 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dbxout.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gcc/dbxout.c') diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 9657120b29b..8c6a72e05ff 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -983,6 +983,7 @@ dbxout_init (const char *input_file_name) char ltext_label_name[100]; bool used_ltext_label_name = false; tree syms = lang_hooks.decls.getdecls (); + const char *mapped_name; typevec_len = 100; typevec = ggc_calloc (typevec_len, sizeof typevec[0]); @@ -1008,6 +1009,7 @@ dbxout_init (const char *input_file_name) cwd = "/"; else if (!IS_DIR_SEPARATOR (cwd[strlen (cwd) - 1])) cwd = concat (cwd, "/", NULL); + cwd = remap_debug_filename (cwd); } #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd); @@ -1018,10 +1020,11 @@ dbxout_init (const char *input_file_name) #endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ } + mapped_name = remap_debug_filename (input_file_name); #ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME - DBX_OUTPUT_MAIN_SOURCE_FILENAME (asm_out_file, input_file_name); + DBX_OUTPUT_MAIN_SOURCE_FILENAME (asm_out_file, mapped_name); #else - dbxout_begin_simple_stabs_desc (input_file_name, N_SO, get_lang_number ()); + dbxout_begin_simple_stabs_desc (mapped_name, N_SO, get_lang_number ()); dbxout_stab_value_label (ltext_label_name); used_ltext_label_name = true; #endif @@ -1163,7 +1166,7 @@ dbxout_start_source_file (unsigned int line ATTRIBUTE_UNUSED, n->prev = NULL; current_file->prev = n; n->bincl_status = BINCL_PENDING; - n->pending_bincl_name = filename; + n->pending_bincl_name = remap_debug_filename (filename); pending_bincls = 1; current_file = n; #endif @@ -1229,7 +1232,7 @@ dbxout_source_file (const char *filename) if (current_function_decl == NULL_TREE) switch_to_section (text_section); - dbxout_begin_simple_stabs (filename, N_SOL); + dbxout_begin_simple_stabs (remap_debug_filename (filename), N_SOL); dbxout_stab_value_internal_label ("Ltext", &source_label_number); lastfile = filename; } -- cgit v1.2.1