aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/c-opts.c10
-rw-r--r--gcc/dbxout.c6
-rw-r--r--gcc/debug.c3
-rw-r--r--gcc/debug.h4
-rw-r--r--gcc/dwarf2out.c3
-rw-r--r--gcc/sdbout.c3
-rw-r--r--gcc/vmsdbgout.c3
8 files changed, 35 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2da080a..a48df49 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2005-03-22 Daniel Berlin <dberlin@dberlin.org>
+
+ * c-opts.c (c_common_parse_file): Only start/end main source file
+ if debug hooks says the writer wants it.
+ * dbxout.c (dbx_debug_hooks): Add start_end_main_source_file
+ member.
+ (xcoff_debug_hooks): Ditto.
+ * debug.c (do_nothing_hooks): Ditto.
+ * debug.h (gcc_debug_hooks): Ditto.
+ * dwarf2out.c (dwarf2_debug_hooks): Ditto.
+ * sdbout.c (sdb_debug_hooks): Ditto.
+ * vmsdbgout.c (vmsdbg_debug_hooks): Ditto.
+
2005-03-22 Mark Mitchell <mark@codesourcery.com>
* doc/extend.texi: Deprecate C++ min/max operators.
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 731511a..42c8236 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -1102,16 +1102,18 @@ c_common_parse_file (int set_yydebug)
i = 0;
for (;;)
{
- /* Start the main input file */
- (*debug_hooks->start_source_file) (0, this_input_filename);
+ /* Start the main input file, if the debug writer wants it. */
+ if (debug_hooks->start_end_main_source_file)
+ (*debug_hooks->start_source_file) (0, this_input_filename);
finish_options ();
pch_init ();
push_file_scope ();
c_parse_file ();
finish_file ();
pop_file_scope ();
- /* And end the main input file. */
- (*debug_hooks->end_source_file) (0);
+ /* And end the main input file, if the debug writer wants it */
+ if (debug_hooks->start_end_main_source_file)
+ (*debug_hooks->end_source_file) (0);
if (++i >= num_in_fnames)
break;
cpp_undef_all (parse_in);
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 6383d48..271cc19 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -378,7 +378,8 @@ const struct gcc_debug_hooks dbx_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx, /* label */
dbxout_handle_pch, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
#endif /* DBX_DEBUGGING_INFO */
@@ -408,7 +409,8 @@ const struct gcc_debug_hooks xcoff_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx, /* label */
dbxout_handle_pch, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
#endif /* XCOFF_DEBUGGING_INFO */
diff --git a/gcc/debug.c b/gcc/debug.c
index 8129206..226dc4e 100644
--- a/gcc/debug.c
+++ b/gcc/debug.c
@@ -47,7 +47,8 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
/* This file contains implementations of each debug hook that do
diff --git a/gcc/debug.h b/gcc/debug.h
index 547b7f6..3feccc5 100644
--- a/gcc/debug.h
+++ b/gcc/debug.h
@@ -119,6 +119,10 @@ struct gcc_debug_hooks
/* Called from final_scan_insn for any NOTE_INSN_VAR_LOCATION note. */
void (* var_location) (rtx);
+
+ /* This is 1 if the debug writer wants to see start and end commands for the
+ main source files, and 0 otherwise. */
+ int start_end_main_source_file;
};
extern const struct gcc_debug_hooks *debug_hooks;
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c4030f2..24e573b 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3444,7 +3444,8 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
dwarf2out_abstract_function, /* outlining_inline_function */
debug_nothing_rtx, /* label */
debug_nothing_int, /* handle_pch */
- dwarf2out_var_location
+ dwarf2out_var_location,
+ 1 /* start_end_main_source_file */
};
#endif
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 91a7a2c..e6ab7fb 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -335,7 +335,8 @@ const struct gcc_debug_hooks sdb_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
sdbout_label, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
/* Return a unique string to name an anonymous type. */
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index 158661d..d0f4abe 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -209,7 +209,8 @@ const struct gcc_debug_hooks vmsdbg_debug_hooks
vmsdbgout_abstract_function,
debug_nothing_rtx, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
/* Definitions of defaults for assembler-dependent names of various