This revision was automatically updated to reflect the committed changes. Closed by commit rG3b0f38bb5186: [LLDB][NativePDB] Fix parameter size for member functions LF_MFUNCTION (authored by zequanwu).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136209/new/ https://reviews.llvm.org/D136209 Files: lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Index: lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -1897,9 +1897,24 @@ ProcSym proc(static_cast<SymbolRecordKind>(sym.kind())); cantFail(SymbolDeserializer::deserializeAs<ProcSym>(sym, proc)); CVType signature = m_index->tpi().getType(proc.FunctionType); - ProcedureRecord sig; - cantFail(TypeDeserializer::deserializeAs<ProcedureRecord>(signature, sig)); - params_remaining = sig.getParameterCount(); + if (signature.kind() == LF_PROCEDURE) { + ProcedureRecord sig; + if (llvm::Error e = TypeDeserializer::deserializeAs<ProcedureRecord>( + signature, sig)) { + llvm::consumeError(std::move(e)); + return 0; + } + params_remaining = sig.getParameterCount(); + } else if (signature.kind() == LF_MFUNCTION) { + MemberFunctionRecord sig; + if (llvm::Error e = TypeDeserializer::deserializeAs<MemberFunctionRecord>( + signature, sig)) { + llvm::consumeError(std::move(e)); + return 0; + } + params_remaining = sig.getParameterCount(); + } else + return 0; break; } case S_BLOCK32:
Index: lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -1897,9 +1897,24 @@ ProcSym proc(static_cast<SymbolRecordKind>(sym.kind())); cantFail(SymbolDeserializer::deserializeAs<ProcSym>(sym, proc)); CVType signature = m_index->tpi().getType(proc.FunctionType); - ProcedureRecord sig; - cantFail(TypeDeserializer::deserializeAs<ProcedureRecord>(signature, sig)); - params_remaining = sig.getParameterCount(); + if (signature.kind() == LF_PROCEDURE) { + ProcedureRecord sig; + if (llvm::Error e = TypeDeserializer::deserializeAs<ProcedureRecord>( + signature, sig)) { + llvm::consumeError(std::move(e)); + return 0; + } + params_remaining = sig.getParameterCount(); + } else if (signature.kind() == LF_MFUNCTION) { + MemberFunctionRecord sig; + if (llvm::Error e = TypeDeserializer::deserializeAs<MemberFunctionRecord>( + signature, sig)) { + llvm::consumeError(std::move(e)); + return 0; + } + params_remaining = sig.getParameterCount(); + } else + return 0; break; } case S_BLOCK32:
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits