This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] DWARF5 .debug_line DW_LNCT_* reorder for readelf [Re: [PATCH] DWARF5 .debug_line{,_str} support]


On Thu, Nov 24, 2016 at 04:07:22PM +0100, Jan Kratochvil wrote:
> On Thu, 20 Oct 2016 01:30:39 +0200, Jakub Jelinek wrote:
> > This patch adds support for DWARF5 .debug_line{,_str} section format,
> > though only if !DWARF2_ASM_LINE_DEBUG_INFO, because otherwise
> > .debug_line is emitted by the assembler.
> 
> with current GCC trunk (with the GCC patch above) binutils readelf DWARF-5
> patch being prepared outputs:
> 
>  The File name Table (offset 0x30):
>   Entry	Name	Dir
>   0	(indirect line string, offset: 0x0): /home/jkratoch/t/classic.C	0
>   1	(indirect line string, offset: 0x11): classic.C	1
> 
> Please see the tabs there.
> 
> After this GCC patch below readelf would output:
> 
>  The File name Table (offset 0x30):
>   Entry	Dir	Name
>   0	0	(indirect line string, offset: 0x0): /home/jkratoch/t/classic.C
>   1	1	(indirect line string, offset: 0x11): classic.C
> 
> That 'indirect line string' may get removed, that is irrelevant for this mail.
> 
> I could reorder that in readelf but I find it easier to do in GCC.
> Also binutils has not switched to C++ yet so I have found the reordering not
> trivial to do in readelf itself.
> 
> The readelf patch being prepared - not yet submitted:
> 	https://people.redhat.com/jkratoch/readelf-dwarf5.patch
> 
> OK for GCC trunk?
> 
> Sorry I have not regression tested it, I would handle that before a check-in.

Dunno, will defer to Jason.  I'd think that reordering for improved
readability should be readelf's job, and that the current order better
matches the DWARF4 order.  But it isn't a big deal for me.
Some other producer might emit it in a different order though...
E.g. readelf could print each entry in 2 passes, first prints selected
subset of DW_LCNT_* and the other pass prints the remaining ones.

	Jakub


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