Skip to content

Commit 745c0b3

Browse files
committed
[RTTI] Fix Itanium RTTI scan failing to symbolize objects with extern typeinfo
The issue stems from the gnu3 demangler changing in 260ca61 Fixes #8080
1 parent 24eabc0 commit 745c0b3

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

plugins/rtti/itanium.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,11 @@ std::optional<ClassInfo> ItaniumRTTIProcessor::ProcessRTTI(uint64_t objectAddr)
446446
return std::nullopt;
447447
auto symName = sym->GetShortName();
448448
// Remove type info prefix.
449-
if (symName.rfind("_typeinfo_for_", 0) != 0)
450-
return std::nullopt;
451-
return symName.substr(14);
449+
if (symName.rfind("_typeinfo_for_", 0) == 0)
450+
return symName.substr(14);
451+
if (symName.rfind("typeinfo_for_", 0) == 0)
452+
return symName.substr(13);
453+
return std::nullopt;
452454
};
453455

454456
if (typeInfoVariant == TIVSIClass)

0 commit comments

Comments
 (0)