Commit bebc7e8b by Zack Weinberg

c-lex.c (yyparse): Call debug_hooks->start_source_file for the primary source file...

	* c-lex.c (yyparse): Call debug_hooks->start_source_file for
	the primary source file; this has not been done yet.
	* c-decl.c (c_expand_body): Reset input_filename from
	DECL_SOURCE_FILE (fndecl) before calling init_function_start.

From-SVN: r49383
parent 81622d29
2002-01-31 Zack Weinberg <zack@codesourcery.com>
* c-lex.c (yyparse): Call debug_hooks->start_source_file for
the primary source file; this has not been done yet.
* c-decl.c (c_expand_body): Reset input_filename from
DECL_SOURCE_FILE (fndecl) before calling init_function_start.
2002-01-31 Kazu Hirata <kazu@hxi.com> 2002-01-31 Kazu Hirata <kazu@hxi.com>
* rtlanal.c (subreg_regno_offset): Do not use * rtlanal.c (subreg_regno_offset): Do not use
......
...@@ -7014,6 +7014,7 @@ c_expand_body (fndecl, nested_p, can_defer_p) ...@@ -7014,6 +7014,7 @@ c_expand_body (fndecl, nested_p, can_defer_p)
/* Initialize the RTL code for the function. */ /* Initialize the RTL code for the function. */
current_function_decl = fndecl; current_function_decl = fndecl;
input_filename = DECL_SOURCE_FILE (fndecl);
init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl)); init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl));
/* This function is being processed in whole-function mode. */ /* This function is being processed in whole-function mode. */
......
...@@ -150,11 +150,14 @@ init_c_lex (filename) ...@@ -150,11 +150,14 @@ init_c_lex (filename)
} }
/* A thin wrapper around the real parser that initializes the /* A thin wrapper around the real parser that initializes the
integrated preprocessor after debug output has been initialized. */ integrated preprocessor after debug output has been initialized.
Also, make sure the start_source_file debug hook gets called for
the primary source file. */
int int
yyparse() yyparse()
{ {
(*debug_hooks->start_source_file) (lineno, input_filename);
cpp_finish_options (parse_in); cpp_finish_options (parse_in);
return yyparse_1(); return yyparse_1();
......
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