From c35b91cee23079e32f421dbea5e2697ae492ef6b Mon Sep 17 00:00:00 2001 From: Adrian McCarthy Date: Tue, 26 Jan 2016 00:58:09 +0000 Subject: Set symbol types for function symbols loaded from PE/COFF This fixes the regression of several tests on Windows after rL258621. The root problem is that ObjectFilePECOFF was not setting type information for the symbols, and the new CL rejects symbols without type information, breaking functionality like thread step-over. The fix sets the type information for functions (and creates a TODO for other types). Along the way, I fixed some typos and formatting that made the code I was debugging harder to understand. In the long run, we should consider replacing most of ObjectFilePECOFF with the COFF parsing code from LLVM. Differential Revision: http://reviews.llvm.org/D16563 llvm-svn: 258758 --- lldb/source/Core/Module.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'lldb/source/Core/Module.cpp') diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index c4d90f53db0..a29456f5b5a 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -560,14 +560,16 @@ Module::ResolveSymbolContextForAddress (const Address& so_addr, uint32_t resolve if (symtab && so_addr.IsSectionOffset()) { Symbol *matching_symbol = nullptr; - symtab->ForEachSymbolContainingFileAddresss (so_addr.GetFileAddress(), [&matching_symbol](Symbol *symbol) -> bool { - if (symbol->GetType() != eSymbolTypeInvalid) - { - matching_symbol = symbol; - return false; // Stop iterating - } - return true; // Keep iterating - }); + + symtab->ForEachSymbolContainingFileAddress(so_addr.GetFileAddress(), + [&matching_symbol](Symbol *symbol) -> bool { + if (symbol->GetType() != eSymbolTypeInvalid) + { + matching_symbol = symbol; + return false; // Stop iterating + } + return true; // Keep iterating + }); sc.symbol = matching_symbol; if (!sc.symbol && resolve_scope & eSymbolContextFunction && !(resolved_flags & eSymbolContextFunction)) -- cgit v1.2.3