diff options
author | Daniel Berlin <dan@cgsoftware.com> | 2001-07-04 17:55:20 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2001-07-04 17:55:20 +0000 |
commit | 84a5b4f858fc2aec5f871e606cdfef3dd4a15948 (patch) | |
tree | 866053af775f4ecaac850dcdb59314ecf5745f95 /gcc/toplev.c | |
parent | 792760b9e9c015cabd3d5f1f7cf4942081f646d6 (diff) | |
download | gcc-84a5b4f858fc2aec5f871e606cdfef3dd4a15948.zip gcc-84a5b4f858fc2aec5f871e606cdfef3dd4a15948.tar.gz gcc-84a5b4f858fc2aec5f871e606cdfef3dd4a15948.tar.bz2 |
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
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 762b7f1..94b830e 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -4272,7 +4272,7 @@ static int decode_g_option (arg) const char *arg; { - unsigned level; + static unsigned level=0; /* A lot of code assumes write_symbols == NO_DEBUG if the debugging level is 0 (thus -gstabs1 -gstabs0 would lose track of what debugging type has been selected). This records the @@ -4316,7 +4316,7 @@ decode_g_option (arg) if (*p) level = read_integral_parameter (p, 0, max_debug_level + 1); else - level = 2; + level = (level == 0) ? 2 : level; if (da_len > 1 && *p && !strncmp (arg, "dwarf", da_len)) { @@ -5177,7 +5177,8 @@ print_switch_values (file, pos, max, indent, sep, term) /* Record the beginning of a new source file, named FILENAME. */ void -debug_start_source_file (filename) +debug_start_source_file (lineno, filename) + register unsigned int lineno ATTRIBUTE_UNUSED; register const char *filename ATTRIBUTE_UNUSED; { #ifdef DBX_DEBUGGING_INFO @@ -5191,7 +5192,7 @@ debug_start_source_file (filename) #endif /* DWARF_DEBUGGING_INFO */ #ifdef DWARF2_DEBUGGING_INFO if (write_symbols == DWARF2_DEBUG) - dwarf2out_start_source_file (filename); + dwarf2out_start_source_file (lineno, filename); #endif /* DWARF2_DEBUGGING_INFO */ #ifdef SDB_DEBUGGING_INFO if (write_symbols == SDB_DEBUG) |