This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: GAS not emitting debug_line section when it should
- To: Daniel Berlin <dan at cgsoftware dot com>
- Subject: Re: GAS not emitting debug_line section when it should
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: 18 Jun 2001 10:43:59 -0400
- Cc: binutils at sources dot redhat dot com, rth at redhat dot com
- References: <87ofrpukfg.fsf@cgsoftware.com><20010618193524.J32219@bubble.local>
Alan Modra <amodra@bigpond.net.au> writes:
Why yes, yes it does.
Thank you very much.
> 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;
--
"When I woke up this morning my girlfriend asked me, "Did you
sleep good?" I said, "No, I made a few mistakes."
"-Steven Wright