This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GAS not emitting debug_line section when it should


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]