This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [hjl@lucon.org: Re: PATCH: Output dwarf debug info only when needed]
- From: Nick Clifton <nickc at redhat dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: "H . J . Lu" <hjl at lucon dot org>, binutils at sources dot redhat dot com,Richard Henderson <rth at redhat dot com>
- Date: 31 Jul 2002 10:54:06 +0100
- Subject: Re: [hjl@lucon.org: Re: PATCH: Output dwarf debug info only when needed]
- References: <20020730183903.GA10504@nevyn.them.org>
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