aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2005-03-04 03:08:10 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2005-03-04 03:08:10 +0000
commit3c0d102013cd6e7c5414efe07623ae014e476f8a (patch)
tree8b30afa78d4a038ac01a473a3fda126b6bbd2757 /gcc/dwarf2out.c
parent9bdae6af0e9d0e9825c5df7b3754f9d815a657f9 (diff)
downloadgcc-3c0d102013cd6e7c5414efe07623ae014e476f8a.zip
gcc-3c0d102013cd6e7c5414efe07623ae014e476f8a.tar.gz
gcc-3c0d102013cd6e7c5414efe07623ae014e476f8a.tar.bz2
re PR debug/20253 (Macro debug info broken due to lexer change)
2005-03-03 Daniel Berlin <dberlin@dbrelin.org> Fix PR debug/20253 * c-opts.c (c_common_parse_file): Call start_source_file and end_source_file at the approriate times. * dwarf2out.c (dwarf2out_finish): Don't auto-end the main file, it will be done for us now. From-SVN: r95872
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 76661ba..5157ae3 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -10497,8 +10497,12 @@ add_abstract_origin_attribute (dw_die_ref die, tree origin)
if (TYPE_P (fn))
fn = TYPE_STUB_DECL (fn);
+
+ /* TYPE_STUB_DECL may have given us a NULL, which decl_function_context
+ won't like. */
+ if (fn)
+ fn = decl_function_context (fn);
- fn = decl_function_context (fn);
if (fn)
dwarf2out_abstract_function (fn);
}
@@ -13795,11 +13799,10 @@ dwarf2out_finish (const char *filename)
output_ranges ();
}
- /* Have to end the primary source file. */
+ /* Have to end the macro section. */
if (debug_info_level >= DINFO_LEVEL_VERBOSE)
{
named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
- dw2_asm_output_data (1, DW_MACINFO_end_file, "End file");
dw2_asm_output_data (1, 0, "End compilation unit");
}