Module: wine Branch: master Commit: 05368de685faa3d5c8695ca6f3b5970688ae8ba8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=05368de685faa3d5c8695ca6f3...
Author: Peter Oberndorfer kumbayo84@arcor.de Date: Mon Nov 6 20:05:34 2006 +0100
dbghelp: Make dwarf2 parser only report file numbers when at least one compilation unit really has numbers.
---
dlls/dbghelp/dwarf.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index b68824b..4253413 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -1581,7 +1581,7 @@ static void dwarf2_set_line_number(struc symt_add_func_line(module, func, *psrc, line, address - func->address); }
-static void dwarf2_parse_line_numbers(const dwarf2_section_t* sections, +static BOOL dwarf2_parse_line_numbers(const dwarf2_section_t* sections, dwarf2_parse_context_t* ctx, const char* compile_dir, unsigned long offset) @@ -1598,7 +1598,7 @@ static void dwarf2_parse_line_numbers(co
/* section with line numbers stripped */ if (sections[section_line].address == NO_MAP) - return; + return FALSE;
traverse.data = sections[section_line].address + offset; traverse.start_data = traverse.data; @@ -1754,6 +1754,7 @@ static void dwarf2_parse_line_numbers(co } } } + return TRUE; }
static BOOL dwarf2_parse_compilation_unit(const dwarf2_section_t* sections, @@ -1828,7 +1829,8 @@ static BOOL dwarf2_parse_compilation_uni } if (dwarf2_find_attribute(&ctx, di, DW_AT_stmt_list, &stmt_list)) { - dwarf2_parse_line_numbers(sections, &ctx, comp_dir.u.string, stmt_list.u.uvalue); + if (dwarf2_parse_line_numbers(sections, &ctx, comp_dir.u.string, stmt_list.u.uvalue)) + module->module.LineNumbers = TRUE; } ret = TRUE; } @@ -1875,7 +1877,6 @@ BOOL dwarf2_parse(struct module* module, module->module.SymType = SymDia; module->module.CVSig = 'D' | ('W' << 8) | ('A' << 16) | ('R' << 24); /* FIXME: we could have a finer grain here */ - module->module.LineNumbers = TRUE; module->module.GlobalSymbols = TRUE; module->module.TypeInfo = TRUE; module->module.SourceIndexed = TRUE;