Commit 84a5b4f8 by Daniel Berlin Committed by Daniel Berlin

c-lex.c (cb_file_change): Pass line number to debug_start_source_file.

2001-07-04  Daniel Berlin  <dan@cgsoftware.com>

	* c-lex.c (cb_file_change): Pass line number to
	debug_start_source_file.
	(cb_undefine): Pass correct line number to debug_undef.

	* toplev.c (debug_start_source_file): Add line number to
	parameters. Pass it along to dwarf2out_start_source_file.
	(decode_g_option): Stop resetting debug level back to normal when
	we change debug formats, unless the current level is
	none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than
	3).

	* toplev.h (debug_start_source_file): Add line number to
	parameters.

	* dwarf2out.h (dwarf2out_start_source_file): Add line number to parameters.

	* dwarf2out.c (dwarf2out_start_source_file): Add line number to
	parameters.
	Output debug_macinfo data for starting file if requested.
	(dwarf2out_end_source_file): Output debug_macinfo data for ending
	file if requested.
	(dwarf2out_define): Output debug_macinfo data for defining a macro if requested.
	(dwarf2out_undef): Output debug_macinfo data for undefining a
	macro if requested.
	(DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name.
	(DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label.
	(macinfo_section_label): New. DWARF2 macro info section label.
	(dwarf2out_init): If we want macro info, output the start label
	for the section.
	(dwarf2out_finish): If we want macro info, add a DW_AT_macro_info
	attribute to the compilation unit die pointing to the macro info.

2001-07-04  Daniel Berlin  <dan@cgsoftware.com>

	* dwarf2out.c (new_loc_list): Move to inside #ifdef
	DWARF2_DEBUGGING_INFO.
	(add_loc_descr_to_loc_list): Ditto.
	(output_loc_list): Ditto.
	Also, fix thinko in curr not being initialized.
	(gen_internal_sym): Ditto.

From-SVN: r43763
parent 792760b9
2001-07-04 Daniel Berlin <dan@cgsoftware.com>
* c-lex.c (cb_file_change): Pass line number to
debug_start_source_file.
(cb_undefine): Pass correct line number to debug_undef.
* toplev.c (debug_start_source_file): Add line number to
parameters. Pass it along to dwarf2out_start_source_file.
(decode_g_option): Stop resetting debug level back to normal when
we change debug formats, unless the current level is
none. (Before, -g3 -gdwarf-2 would use debug level 2, rather than
3).
* toplev.h (debug_start_source_file): Add line number to
parameters.
* dwarf2out.h (dwarf2out_start_source_file): Add line number to parameters.
* dwarf2out.c (dwarf2out_start_source_file): Add line number to
parameters.
Output debug_macinfo data for starting file if requested.
(dwarf2out_end_source_file): Output debug_macinfo data for ending
file if requested.
(dwarf2out_define): Output debug_macinfo data for defining a macro if requested.
(dwarf2out_undef): Output debug_macinfo data for undefining a
macro if requested.
(DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name.
(DEBUG_MACINFO_SECTION_LABEL): New. DWARF2 macro info section label.
(macinfo_section_label): New. DWARF2 macro info section label.
(dwarf2out_init): If we want macro info, output the start label
for the section.
(dwarf2out_finish): If we want macro info, add a DW_AT_macro_info
attribute to the compilation unit die pointing to the macro info.
2001-07-04 Daniel Berlin <dan@cgsoftware.com>
* dwarf2out.c (new_loc_list): Move to inside #ifdef
DWARF2_DEBUGGING_INFO.
(add_loc_descr_to_loc_list): Ditto.
(output_loc_list): Ditto.
Also, fix thinko in curr not being initialized.
(gen_internal_sym): Ditto.
Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Wed Jul 4 13:40:02 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* emit-rtl.c (replace_equiv_address): New function. * emit-rtl.c (replace_equiv_address): New function.
......
...@@ -249,7 +249,7 @@ cb_file_change (pfile, fc) ...@@ -249,7 +249,7 @@ cb_file_change (pfile, fc)
lineno = fc->from.lineno; lineno = fc->from.lineno;
push_srcloc (fc->to.filename, 1); push_srcloc (fc->to.filename, 1);
input_file_stack->indent_level = indent_level; input_file_stack->indent_level = indent_level;
debug_start_source_file (fc->to.filename); debug_start_source_file (fc->from.lineno, fc->to.filename);
#ifndef NO_IMPLICIT_EXTERN_C #ifndef NO_IMPLICIT_EXTERN_C
if (c_header_level) if (c_header_level)
++c_header_level; ++c_header_level;
...@@ -334,7 +334,7 @@ cb_define (pfile, node) ...@@ -334,7 +334,7 @@ cb_define (pfile, node)
cpp_reader *pfile; cpp_reader *pfile;
cpp_hashnode *node; cpp_hashnode *node;
{ {
debug_define (lineno, (const char *) cpp_macro_definition (pfile, node)); debug_define (cpp_get_line (parse_in)->line, (const char *) cpp_macro_definition (pfile, node));
} }
/* #undef callback for DWARF and DWARF2 debug info. */ /* #undef callback for DWARF and DWARF2 debug info. */
...@@ -343,7 +343,7 @@ cb_undef (pfile, node) ...@@ -343,7 +343,7 @@ cb_undef (pfile, node)
cpp_reader *pfile ATTRIBUTE_UNUSED; cpp_reader *pfile ATTRIBUTE_UNUSED;
cpp_hashnode *node; cpp_hashnode *node;
{ {
debug_undef (lineno, (const char *) NODE_NAME (node)); debug_undef (cpp_get_line (parse_in)->line, (const char *) NODE_NAME (node));
} }
#if 0 /* not yet */ #if 0 /* not yet */
......
...@@ -23,7 +23,7 @@ extern void dwarf2out_finish PARAMS ((void)); ...@@ -23,7 +23,7 @@ extern void dwarf2out_finish PARAMS ((void));
extern void dwarf2out_define PARAMS ((unsigned, const char *)); extern void dwarf2out_define PARAMS ((unsigned, const char *));
extern void dwarf2out_undef PARAMS ((unsigned, const char *)); extern void dwarf2out_undef PARAMS ((unsigned, const char *));
extern void dwarf2out_start_source_file PARAMS ((const char *)); extern void dwarf2out_start_source_file PARAMS ((unsigned, const char *));
extern void dwarf2out_end_source_file PARAMS ((void)); extern void dwarf2out_end_source_file PARAMS ((void));
extern void dwarf2out_begin_block PARAMS ((unsigned)); extern void dwarf2out_begin_block PARAMS ((unsigned));
......
2001-07-04 Daniel Berlin <dan@cgsoftware.com>
* jcf-parse.c (parse_class_file): Add lineno parameter to
debug_start_source_file call.
2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk> 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
* gcj.texi: Use gpl.texi. * gcj.texi: Use gpl.texi.
......
...@@ -773,7 +773,7 @@ parse_class_file () ...@@ -773,7 +773,7 @@ parse_class_file ()
input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class)); input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class));
lineno = 0; lineno = 0;
debug_start_source_file (input_filename); debug_start_source_file (lineno, input_filename);
init_outgoing_cpool (); init_outgoing_cpool ();
/* Currently we always have to emit calls to _Jv_InitClass when /* Currently we always have to emit calls to _Jv_InitClass when
......
...@@ -4272,7 +4272,7 @@ static int ...@@ -4272,7 +4272,7 @@ static int
decode_g_option (arg) decode_g_option (arg)
const char *arg; const char *arg;
{ {
unsigned level; static unsigned level=0;
/* A lot of code assumes write_symbols == NO_DEBUG if the /* A lot of code assumes write_symbols == NO_DEBUG if the
debugging level is 0 (thus -gstabs1 -gstabs0 would lose track debugging level is 0 (thus -gstabs1 -gstabs0 would lose track
of what debugging type has been selected). This records the of what debugging type has been selected). This records the
...@@ -4316,7 +4316,7 @@ decode_g_option (arg) ...@@ -4316,7 +4316,7 @@ decode_g_option (arg)
if (*p) if (*p)
level = read_integral_parameter (p, 0, max_debug_level + 1); level = read_integral_parameter (p, 0, max_debug_level + 1);
else else
level = 2; level = (level == 0) ? 2 : level;
if (da_len > 1 && *p && !strncmp (arg, "dwarf", da_len)) if (da_len > 1 && *p && !strncmp (arg, "dwarf", da_len))
{ {
...@@ -5177,7 +5177,8 @@ print_switch_values (file, pos, max, indent, sep, term) ...@@ -5177,7 +5177,8 @@ print_switch_values (file, pos, max, indent, sep, term)
/* Record the beginning of a new source file, named FILENAME. */ /* Record the beginning of a new source file, named FILENAME. */
void void
debug_start_source_file (filename) debug_start_source_file (lineno, filename)
register unsigned int lineno ATTRIBUTE_UNUSED;
register const char *filename ATTRIBUTE_UNUSED; register const char *filename ATTRIBUTE_UNUSED;
{ {
#ifdef DBX_DEBUGGING_INFO #ifdef DBX_DEBUGGING_INFO
...@@ -5191,7 +5192,7 @@ debug_start_source_file (filename) ...@@ -5191,7 +5192,7 @@ debug_start_source_file (filename)
#endif /* DWARF_DEBUGGING_INFO */ #endif /* DWARF_DEBUGGING_INFO */
#ifdef DWARF2_DEBUGGING_INFO #ifdef DWARF2_DEBUGGING_INFO
if (write_symbols == DWARF2_DEBUG) if (write_symbols == DWARF2_DEBUG)
dwarf2out_start_source_file (filename); dwarf2out_start_source_file (lineno, filename);
#endif /* DWARF2_DEBUGGING_INFO */ #endif /* DWARF2_DEBUGGING_INFO */
#ifdef SDB_DEBUGGING_INFO #ifdef SDB_DEBUGGING_INFO
if (write_symbols == SDB_DEBUG) if (write_symbols == SDB_DEBUG)
......
...@@ -37,7 +37,7 @@ extern int read_integral_parameter PARAMS ((const char *, const char *, ...@@ -37,7 +37,7 @@ extern int read_integral_parameter PARAMS ((const char *, const char *,
extern int count_error PARAMS ((int)); extern int count_error PARAMS ((int));
extern void strip_off_ending PARAMS ((char *, int)); extern void strip_off_ending PARAMS ((char *, int));
extern void print_time PARAMS ((const char *, long)); extern void print_time PARAMS ((const char *, long));
extern void debug_start_source_file PARAMS ((const char *)); extern void debug_start_source_file PARAMS ((unsigned, const char *));
extern void debug_end_source_file PARAMS ((unsigned)); extern void debug_end_source_file PARAMS ((unsigned));
extern void debug_define PARAMS ((unsigned, const char *)); extern void debug_define PARAMS ((unsigned, const char *));
extern void debug_undef PARAMS ((unsigned, const char *)); extern void debug_undef PARAMS ((unsigned, const char *));
......
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