Commit 9e9945c5 by Daniel Berlin Committed by Daniel Berlin

c-opts.c (c_common_parse_file): Only start/end main source file if debug hooks…

c-opts.c (c_common_parse_file): Only start/end main source file if debug hooks says the writer wants it.

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.

From-SVN: r96902
parent 8ff24a79
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.
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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. */
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment