From ffa554edd7d07881a4d1c93cf406aef0cba4086c Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Wed, 17 Apr 2002 23:08:42 +0000 Subject: [PATCH] * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line numbers, gdb relies on them to detect the start of the prologue. --- gas/ChangeLog | 5 +++++ gas/dwarf2dbg.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 30ac042f28..278ea244f1 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2002-04-17 Geoffrey Keating + + * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line + numbers, gdb relies on them to detect the start of the prologue. + 2002-04-17 Martin Schwidefsky * config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 6e62206703..81cbf8a7d2 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -237,8 +237,12 @@ dwarf2_gen_line_info (ofs, loc) if (loc->filenum == 0 || loc->line == 0) return; - /* Don't emit sequences of line symbols for the same line. */ - if (line == loc->line && filenum == loc->filenum) + /* Don't emit sequences of line symbols for the same line when the + symbols apply to assembler code. It is necessary to emit + duplicate line symbols when a compiler asks for them, because GDB + uses them to determine the end of the prologue. */ + if (debug_type == DEBUG_DWARF2 + && line == loc->line && filenum == loc->filenum) return; line = loc->line;