This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
allow gas to emit duplicate line numbers
- From: Geoffrey Keating <geoffk at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 12 Apr 2002 12:41:26 -0700
- Subject: allow gas to emit duplicate line numbers
GDB uses duplicate line numbers to detect the end of the prologue.
GCC would carefully emit them... and gas was stripping them out.
I don't believe this patch will significantly affect the size of the
debug info for assembler source, because having multiple instructions
on a line is rare.
I tested this by running the GAS and GDB testsuites on
powerpc-eabisim.
OK to commit?
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/gas-duplineno.patch=======================
2002-04-12 Geoffrey Keating <geoffk@redhat.com>
* dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line
numbers, gdb relies on them to detect the start of the prologue.
Index: dwarf2dbg.c
===================================================================
RCS file: /cvs/src/src/gas/dwarf2dbg.c,v
retrieving revision 1.44
diff -p -u -p -r1.44 dwarf2dbg.c
--- dwarf2dbg.c 4 Dec 2001 23:07:26 -0000 1.44
+++ dwarf2dbg.c 12 Apr 2002 19:31:05 -0000
@@ -237,10 +237,6 @@ 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)
- return;
-
line = loc->line;
filenum = loc->filenum;
============================================================