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: PATCH: Output dwarf debug info only when needed


On Tue, Jun 11, 2002 at 01:59:43PM -0700, H . J . Lu wrote:
> If we don't generate DWARF2 debugging information, should we generate
> dwarf debug info with one ".file" directive only?
> 
> 
> H.J.

> 2002-06-11  H.J. Lu <hjl@gnu.org>
> 
> 	* dwarf2dbg.c (dwarf2_finish): Output dwarf debug info only
> 	when needed.
> 
> --- gas/dwarf2dbg.c.stabs	Thu May 23 08:22:30 2002
> +++ gas/dwarf2dbg.c	Tue Jun 11 13:21:01 2002
> @@ -1243,7 +1245,8 @@ dwarf2_finish ()
>    struct line_seg *s;
>  
>    /* If no debug information was recorded, nothing to do.  */
> -  if (all_segs == NULL && files_in_use <= 1)
> +  if (all_segs == NULL
> +      && (debug_type != DEBUG_DWARF2 || files_in_use <= 1))
>      return;
>  
>    /* Calculate the size of an address for the target machine.  */

This patch is wrong.  It will never generate debug information for
compiler debug info.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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