sys: Updated llvm demangler, now supports D-Lang and Rust symbols

This commit is contained in:
WerWolv
2022-08-09 13:51:03 +02:00
parent f1ec2ef0c4
commit 0192c791ce
30 changed files with 4807 additions and 2494 deletions

View File

@@ -37,15 +37,21 @@ namespace hex::plugin::builtin {
using namespace hex::literals;
void drawDemangler() {
static std::vector<char> mangledBuffer(0xF'FFFF, 0x00);
static std::string demangledName;
static std::string mangledName, demangledName;
if (ImGui::InputText("hex.builtin.tools.demangler.mangled"_lang, mangledBuffer.data(), 0xF'FFFF)) {
demangledName = llvm::demangle(mangledBuffer.data());
if (ImGui::InputTextWithHint("hex.builtin.tools.demangler.mangled"_lang, "Itanium, MSVC, Dlang & Rust", mangledName)) {
demangledName = llvm::demangle(mangledName);
if (demangledName == mangledName) {
demangledName = "???";
}
}
ImGui::InputText("hex.builtin.tools.demangler.demangled"_lang, demangledName.data(), demangledName.size(), ImGuiInputTextFlags_ReadOnly);
ImGui::NewLine();
ImGui::Header("hex.builtin.tools.demangler.demangled"_lang);
if (ImGui::BeginChild("demangled", ImVec2(0, 200_scaled), true)) {
ImGui::TextFormattedWrapped("{}", demangledName);
}
ImGui::EndChild();
}
void drawASCIITable() {