This is the mail archive of the 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] Fix .debug_line version 4 handling

On 04/01/2010 05:52 AM, Jakub Jelinek wrote:
> Hi!
> 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  <>
> include/
> 	* dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn
> 	field.
> bfd/
> 	* 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.
> binutils/
> 	* 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.



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