Author: akhaldi Date: Sat Sep 20 18:06:09 2014 New Revision: 64203 URL: http://svn.reactos.org/svn/reactos?rev=64203&view=rev Log: [DBGHELP] * Work around a Clang bug w.r.t. dwarf emission. Brought to you by the mighty Arty. CORE-8516 #comment Now ReactOS can compile a bootcd with Clang, and it boots to shell. Only some PSEH bug(s) remain for it to be fully functional and ready for testman (I'm looking at you, Timo ;) )
Modified: trunk/reactos/dll/win32/dbghelp/dwarf.c Modified: trunk/reactos/dll/win32/dbghelp/dwarf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dwarf.c?rev=64203&r1=64202&r2=64203&view=diff ============================================================================== --- trunk/reactos/dll/win32/dbghelp/dwarf.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dbghelp/dwarf.c [iso-8859-1] Sat Sep 20 18:06:09 2014 @@ -2381,7 +2381,17 @@ } if (dwarf2_find_attribute(&ctx, di, DW_AT_stmt_list, &stmt_list)) { +#ifdef __REACTOS__ + unsigned long stmt_list_val = stmt_list.u.uvalue; + if (stmt_list_val > module->module.BaseOfImage) + { + /* FIXME: Clang is recording this as an address, not an offset */ + stmt_list_val -= module->module.BaseOfImage + sections[section_line].rva; + } + if (dwarf2_parse_line_numbers(sections, &ctx, comp_dir.u.string, stmt_list_val)) +#else if (dwarf2_parse_line_numbers(sections, &ctx, comp_dir.u.string, stmt_list.u.uvalue)) +#endif module->module.LineNumbers = TRUE; } ret = TRUE;