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]
Other format: [Raw text]

Re: [hjl@lucon.org: Re: PATCH: Output dwarf debug info only when needed]


Hi Daniel,

> Going through my 2.13 queue - could someone please review this
> patch? 

> +++ gas/dwarf2dbg.c	Tue Jun 11 14:41:25 2002

> -  /* If no debug information was recorded, nothing to do.  */
> -  if (all_segs == NULL && files_in_use <= 1)
> +  /* If no debug information was recorded, nothing to do. Don't
> +     emit dwarf debug info for one ".file" directive only unless
> +     we are generating DWARF2 debugging info.  */
> +  if (debug_type != DEBUG_DWARF2 && all_segs == NULL
> +      && files_in_use <= 2)
>      return;

I think that the comment is rather confusing.  How about this
rewording ?

 +  /* If no debug information was recorded, then we do not need
 +     to do anything unless we are emitting DWARF2 line tables
 +     or there was more than one input file.  */
 +  if (all_segs == NULL
 +      && debug_type != DEBUG_DWARF2
 +      && files_in_use <= 2)
      return;

Also, shouldn't the test for the number of files be either
"files_in_use <= 1" or "files_in_use < 2" ?

Cheers
        Nick


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