Commit e87f3dd5 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp/dwarf: Properly parse line number header for DWARF4 debug info.

parent e28ec5a0
......@@ -2222,7 +2222,7 @@ static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections,
{
dwarf2_traverse_context_t traverse;
ULONG_PTR length;
unsigned insn_size, default_stmt;
unsigned insn_size, version, default_stmt;
unsigned line_range, opcode_base;
int line_base;
unsigned char offset_size;
......@@ -2256,9 +2256,11 @@ static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections,
WARN("out of bounds header\n");
return FALSE;
}
dwarf2_parse_u2(&traverse); /* version */
version = dwarf2_parse_u2(&traverse);
dwarf2_parse_offset(&traverse, offset_size); /* header_len */
insn_size = dwarf2_parse_byte(&traverse);
if (version >= 4)
dwarf2_parse_byte(&traverse); /* max_operations_per_instructions */
default_stmt = dwarf2_parse_byte(&traverse);
line_base = (signed char)dwarf2_parse_byte(&traverse);
line_range = dwarf2_parse_byte(&traverse);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment