This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Fix .debug_line version 4 handling
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, Cary Coutant <ccoutant at google dot com>
- Date: Mon, 05 Apr 2010 12:24:40 -0700
- Subject: Re: [PATCH] Fix .debug_line version 4 handling
- References: <20100401125212.GJ3601@sunsite.ms.mff.cuni.cz>
On 04/01/2010 05:52 AM, Jakub Jelinek wrote:
> As pointed out by Cary, version 4 unfortunately adds a field
> into the middle of .debug_line header.
> This patch handles that and attempts to also support
> the new op_index state machine register if the new field is
> not 1 (well, on the ld side it will just record it in the table, but the
> querying routines still will not use it, on the readelf side
> it will dump it). GCC won't generate max_ops_per_insn != 1
> for the time being though, gas probably should eventually for ia64
> and other VLIW arches.
> Tested on x86_64-linux, ok to commit?
> 2010-04-01 Jakub Jelinek <email@example.com>
> * dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn
> * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
> (struct line_info): Add op_index field, change end_sequence type to
> unsigned char.
> (new_line_sorts_after): For the same address compare op_index.
> (add_line_info): Add op_index argument, store it into the structure.
> (decode_line_info): Complain about unknown versions of .debug_line.
> Initialize maximum_ops_per_insn. Add op_index state register and
> track it.
> * dwarf.c (struct State_Machine_Registers): Add op_index field,
> change end_sequence type to unsigned char.
> (reset_state_machine): Clear op_index.
> (process_extended_line_op): For DW_LNE_set_address clear op_index.
> (display_debug_lines_raw): Initialize li_max_ops_per_insn.
> Track op_index state machine register and print it if
> li_max_ops_per_insn is != 1.
> (display_debug_lines_decoded): Likewise.