Skip to content

Commit

Permalink
RTTI: Demangle names
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Sep 8, 2023
1 parent efa9666 commit de31414
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/arch/Windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,15 @@ std::optional<std::string> WindowsProcess::get_typename_from_vtable(uintptr_t pt
}

auto ti = (std::type_info*)&*typeinfo;
if (ti->raw_name()[0] != '.' || ti->raw_name()[1] != '?') {
return std::nullopt;
}

if (std::string_view{ti->raw_name()}.find("@") == std::string_view::npos) {
return std::nullopt;
}

const auto result = std::string_view{ti->raw_name()};
const auto result = std::string_view{ti->name()};

if (result.empty() || result == " ") {
return std::nullopt;
Expand Down

0 comments on commit de31414

Please sign in to comment.