dbghelp: In dwarf parsing, correctly get the size of addresses in location lists.

This commit is contained in:
Eric Pouech 2010-03-24 22:04:12 +01:00 committed by Alexandre Julliard
parent 8413810c6c
commit 403f41687e
1 changed files with 3 additions and 4 deletions

View File

@ -2213,8 +2213,7 @@ static BOOL dwarf2_parse_compilation_unit(const dwarf2_section_t* sections,
} }
static BOOL dwarf2_lookup_loclist(const struct module_format* modfmt, const BYTE* start, static BOOL dwarf2_lookup_loclist(const struct module_format* modfmt, const BYTE* start,
unsigned long ip, unsigned long ip, dwarf2_traverse_context_t* lctx)
dwarf2_traverse_context_t* lctx)
{ {
DWORD_PTR beg, end; DWORD_PTR beg, end;
const BYTE* ptr = start; const BYTE* ptr = start;
@ -2222,8 +2221,8 @@ static BOOL dwarf2_lookup_loclist(const struct module_format* modfmt, const BYTE
while (ptr < modfmt->u.dwarf2_info->debug_loc.address + modfmt->u.dwarf2_info->debug_loc.size) while (ptr < modfmt->u.dwarf2_info->debug_loc.address + modfmt->u.dwarf2_info->debug_loc.size)
{ {
beg = dwarf2_get_u4(ptr); ptr += 4; beg = dwarf2_get_addr(ptr, modfmt->u.dwarf2_info->word_size); ptr += modfmt->u.dwarf2_info->word_size;
end = dwarf2_get_u4(ptr); ptr += 4; end = dwarf2_get_addr(ptr, modfmt->u.dwarf2_info->word_size); ptr += modfmt->u.dwarf2_info->word_size;
if (!beg && !end) break; if (!beg && !end) break;
len = dwarf2_get_u2(ptr); ptr += 2; len = dwarf2_get_u2(ptr); ptr += 2;