Commit 6d0948f7 authored by Peter Oberndorfer's avatar Peter Oberndorfer Committed by Alexandre Julliard

dbghelp: Make dwarf2_parse_line_numbers handle missing line number section.

parent 5151c81a
......@@ -150,6 +150,7 @@ typedef struct dwarf2_debug_info_s
struct vector children;
} dwarf2_debug_info_t;
#define NO_MAP ((const void*)0xffffffff)
typedef struct dwarf2_section_s
{
......@@ -1595,6 +1596,10 @@ static void dwarf2_parse_line_numbers(const dwarf2_section_t* sections,
struct vector files;
const char** p;
/* section with line numbers stripped */
if (sections[section_line].address == NO_MAP)
return;
traverse.data = sections[section_line].address + offset;
traverse.start_data = traverse.data;
traverse.end_data = traverse.data + 4;
......
......@@ -901,7 +901,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
dw2_debug, fmap->sect[debug_sect].shdr.sh_size,
dw2_debug_abbrev, fmap->sect[debug_abbrev_sect].shdr.sh_size,
dw2_debug_str, fmap->sect[debug_str_sect].shdr.sh_size,
dw2_debug_line, fmap->sect[debug_line_sect].shdr.sh_size);
dw2_debug_line, dw2_debug_line != NO_MAP ? fmap->sect[debug_line_sect].shdr.sh_size : 0);
if (!lret)
WARN("Couldn't correctly read stabs\n");
ret = ret || lret;
......
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