@@ -2526,7 +2526,7 @@ void ElfView::DefineElfSymbol(BNSymbolType type, const string& incomingName, uin
2526
2526
// Try to demangle any C++ symbols
2527
2527
string shortName = rawName;
2528
2528
string fullName = rawName;
2529
- Ref<Type> typeRef = symbolTypeRef;
2529
+ Confidence< Ref<Type> > typeRef = symbolTypeRef;
2530
2530
if (m_arch)
2531
2531
{
2532
2532
QualifiedName demangledName;
@@ -2542,18 +2542,19 @@ void ElfView::DefineElfSymbol(BNSymbolType type, const string& incomingName, uin
2542
2542
}
2543
2543
}
2544
2544
2545
+ // If unable to extract type information, create a default type with the given size and heuristic confidence
2545
2546
if (!typeRef && (size > 0 && size <= 8 ))
2546
2547
{
2547
- typeRef = Type::IntegerType (size, false );
2548
+ typeRef = Type::IntegerType (size, false )-> WithConfidence (BN_HEURISTIC_CONFIDENCE) ;
2548
2549
}
2549
2550
2550
- return std::pair<Ref<Symbol>, Ref<Type>>(
2551
+ return std::pair<Ref<Symbol>, Confidence< Ref<Type> >>(
2551
2552
new Symbol (type, shortName, fullName, rawName, addr, binding, nameSpace), typeRef);
2552
2553
};
2553
2554
2554
2555
if (m_symbolQueue)
2555
2556
{
2556
- m_symbolQueue->Append (process, [this ](Symbol* symbol, Type* type) {
2557
+ m_symbolQueue->Append (process, [this ](Symbol* symbol, const Confidence<Ref< Type>>& type) {
2557
2558
DefineAutoSymbolAndVariableOrFunction (GetDefaultPlatform (), symbol, type);
2558
2559
});
2559
2560
}
0 commit comments