GAS not emitting debug_line section when it should
Alan Modra
amodra@bigpond.net.au
Mon Jun 18 03:01:00 GMT 2001
On Sat, Jun 16, 2001 at 12:18:27AM -0400, Daniel Berlin wrote:
> If we only have .file directives, we never output .debug_line section.
Does this do what you want?
Index: dwarf2dbg.c
===================================================================
RCS file: /cvs/src/src/gas/dwarf2dbg.c,v
retrieving revision 1.39
diff -u -p -r1.39 dwarf2dbg.c
--- dwarf2dbg.c 2001/05/22 10:23:48 1.39
+++ dwarf2dbg.c 2001/06/18 09:41:05
@@ -1212,7 +1212,7 @@ dwarf2_finish ()
struct line_seg *s;
/* If no debug information was recorded, nothing to do. */
- if (all_segs == NULL)
+ if (all_segs == NULL && files_in_use <= 1)
return;
/* Calculate the size of an address for the target machine. */
@@ -1239,7 +1239,7 @@ dwarf2_finish ()
/* If this is assembler generated line info, we need .debug_info
and .debug_abbrev sections as well. */
- if (debug_type == DEBUG_DWARF2)
+ if (all_segs != NULL && debug_type == DEBUG_DWARF2)
{
segT abbrev_seg;
segT info_seg;
More information about the Binutils
mailing list