This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix differing debug-range blocks with/out --dwarf-check
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Henderson, Stuart" <Stuart dot Henderson at analog dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 14 Jan 2015 08:50:58 -0800
- Subject: Re: [PATCH] Fix differing debug-range blocks with/out --dwarf-check
- Authentication-results: sourceware.org; auth=none
- References: <4A389CBDCB95794CA3A0A09E456CC0052F792E19 at NWD2MBX7 dot ad dot analog dot com> <4A389CBDCB95794CA3A0A09E456CC0052F7C5650 at NWD2MBX7 dot ad dot analog dot com>
On Wed, Jan 14, 2015 at 8:42 AM, Henderson, Stuart
<Stuart.Henderson@analog.com> wrote:
> Ping.
> https://sourceware.org/ml/binutils/2015-01/msg00019.html
>
> Cheers,
> Stu
>
> -----Original Message-----
> From: binutils-owner@sourceware.org [mailto:binutils-owner@sourceware.org] On Behalf Of Henderson, Stuart
> Sent: Monday, January 05, 2015 12:40 PM
> To: binutils@sourceware.org
> Subject: [PATCH] Fix differing debug-range blocks with/out --dwarf-check
>
> Hello,
> A while back a change was made to not report .debug_ranges blocks, that are referenced twice in .debug_info, as overlaps when we're doing --dwarf-check. A side-effect of this is that we now show the doubly referenced block once with --dwarf-check and twice without.
>
> e.g. objdump --dwarf=Ranges without --dwarf-check:
> ...
> 000000e8 c100c650 c100c652*
> 000000e8 c100c654 c100c658*
> 000000e8 <End of list>
> 00000100 c100c6a6 c100c748*
> 00000100 c100c750 c100c76a*
> 00000100 c100c772 c100c7fe*
> 00000100 c100c806 c100c80a*
> 00000100 c100c812 c100c8aa*
> 00000100 c100c8b2 c100c988*
> 00000100 <End of list>
> 00000100 c100c6a6 c100c748*
> 00000100 c100c750 c100c76a*
> 00000100 c100c772 c100c7fe*
> 00000100 c100c806 c100c80a*
> 00000100 c100c812 c100c8aa*
> 00000100 c100c8b2 c100c988*
> 00000100 <End of list>
> 00000138 c100c6d0 c100c748*
> 00000138 c100c942 c100c94a*
> ...
>
> objdump --dwarf=Ranges with --dwarf-check:
> ...
> 000000e8 c100c650 c100c652*
> 000000e8 c100c654 c100c658*
> 000000e8 <End of list>
> 00000100 c100c6a6 c100c748*
> 00000100 c100c750 c100c76a*
> 00000100 c100c772 c100c7fe*
> 00000100 c100c806 c100c80a*
> 00000100 c100c812 c100c8aa*
> 00000100 c100c8b2 c100c988*
> 00000100 <End of list>
> 00000138 c100c6d0 c100c748*
> 00000138 c100c942 c100c94a*
> 00000138 <End of list>
> ...
>
> For the sake of consistency, I suggest we always do the latter:
>
> 2015-01-05 Stuart Henderson <shenders@gcc.gnu.org>
>
> * dwarf.c (display_debug_ranges): Don't report the same .debug_ranges
> block twice.
>
> Stu
Can you add a testcase, similar to binutils/testsuite/binutils-all/dw2-1.S?
--
H.J.