From b43e05a8fc7273454a7d1e259eac6b6e278dacfd Mon Sep 17 00:00:00 2001
From: chaoticgd <43898262+chaoticgd@users.noreply.github.com>
Date: Mon, 26 Aug 2024 12:46:25 +0100
Subject: [PATCH] Debugger: Remove the Avast demangler
This library doesn't support the demangling scheme used by GCC 2.x
compilers and hence doesn't work in lots of cases.
---
3rdparty/demangler/CMakeLists.txt | 6 -
3rdparty/demangler/demangler.vcxproj | 60 -
3rdparty/demangler/demangler.vcxproj.filters | 22 -
.../demangler/include/demangler/demangler.h | 45 -
.../demangler/include/demangler/demglobal.h | 20 -
.../demangler/include/demangler/demtools.h | 36 -
.../demangler/include/demangler/gparser.h | 830 ---
3rdparty/demangler/include/demangler/igrams.h | 23 -
.../include/demangler/stgrammars/borlandll.h | 25 -
.../include/demangler/stgrammars/gccll.h | 25 -
.../include/demangler/stgrammars/msll.h | 26 -
3rdparty/demangler/src/CMakeLists.txt | 17 -
3rdparty/demangler/src/demangler.cpp | 131 -
3rdparty/demangler/src/demtools.cpp | 82 -
.../src/extgrammars/gramatika-borland | 467 --
.../demangler/src/extgrammars/gramatika-gcc | 423 --
.../demangler/src/extgrammars/gramatika-ms | 534 --
3rdparty/demangler/src/gparser.cpp | 6131 ----------------
3rdparty/demangler/src/igrams.cpp | 91 -
.../demangler/src/stgrammars/borlandll.cpp | 6245 -----------------
3rdparty/demangler/src/stgrammars/gccll.cpp | 5166 --------------
3rdparty/demangler/src/stgrammars/msll.cpp | 5449 --------------
PCSX2_qt.sln | 42 -
cmake/SearchForStuff.cmake | 3 -
pcsx2-qt/Debugger/CpuWidget.cpp | 46 +-
pcsx2-qt/Debugger/CpuWidget.h | 2 -
pcsx2-qt/Debugger/DisassemblyWidget.cpp | 16 +-
pcsx2-qt/pcsx2-qt.vcxproj | 4 -
pcsx2/CMakeLists.txt | 1 -
29 files changed, 2 insertions(+), 25966 deletions(-)
delete mode 100644 3rdparty/demangler/CMakeLists.txt
delete mode 100644 3rdparty/demangler/demangler.vcxproj
delete mode 100644 3rdparty/demangler/demangler.vcxproj.filters
delete mode 100644 3rdparty/demangler/include/demangler/demangler.h
delete mode 100644 3rdparty/demangler/include/demangler/demglobal.h
delete mode 100644 3rdparty/demangler/include/demangler/demtools.h
delete mode 100644 3rdparty/demangler/include/demangler/gparser.h
delete mode 100644 3rdparty/demangler/include/demangler/igrams.h
delete mode 100644 3rdparty/demangler/include/demangler/stgrammars/borlandll.h
delete mode 100644 3rdparty/demangler/include/demangler/stgrammars/gccll.h
delete mode 100644 3rdparty/demangler/include/demangler/stgrammars/msll.h
delete mode 100644 3rdparty/demangler/src/CMakeLists.txt
delete mode 100644 3rdparty/demangler/src/demangler.cpp
delete mode 100644 3rdparty/demangler/src/demtools.cpp
delete mode 100644 3rdparty/demangler/src/extgrammars/gramatika-borland
delete mode 100644 3rdparty/demangler/src/extgrammars/gramatika-gcc
delete mode 100644 3rdparty/demangler/src/extgrammars/gramatika-ms
delete mode 100644 3rdparty/demangler/src/gparser.cpp
delete mode 100644 3rdparty/demangler/src/igrams.cpp
delete mode 100644 3rdparty/demangler/src/stgrammars/borlandll.cpp
delete mode 100644 3rdparty/demangler/src/stgrammars/gccll.cpp
delete mode 100644 3rdparty/demangler/src/stgrammars/msll.cpp
diff --git a/3rdparty/demangler/CMakeLists.txt b/3rdparty/demangler/CMakeLists.txt
deleted file mode 100644
index 275e1d30d2..0000000000
--- a/3rdparty/demangler/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-
-cmake_minimum_required(VERSION 3.6)
-
-project(demangler CXX)
-
-add_subdirectory(src)
diff --git a/3rdparty/demangler/demangler.vcxproj b/3rdparty/demangler/demangler.vcxproj
deleted file mode 100644
index e7f285049c..0000000000
--- a/3rdparty/demangler/demangler.vcxproj
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
- {1E3D706C-1D95-4E1B-BDF2-CA3D0007DF7F}
-
-
-
- StaticLibrary
- $(DefaultPlatformToolset)
- ClangCL
- MultiByte
- true
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
- AllRules.ruleset
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %(PreprocessorDefinitions)
- TurnOffAllWarnings
- $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)
-
-
-
-
-
diff --git a/3rdparty/demangler/demangler.vcxproj.filters b/3rdparty/demangler/demangler.vcxproj.filters
deleted file mode 100644
index 83cc2b0424..0000000000
--- a/3rdparty/demangler/demangler.vcxproj.filters
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/3rdparty/demangler/include/demangler/demangler.h b/3rdparty/demangler/include/demangler/demangler.h
deleted file mode 100644
index bcdf05dafd..0000000000
--- a/3rdparty/demangler/include/demangler/demangler.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @file include/demangler/demangler.h
- * @brief Demangler library.
- * @copyright (c) 2017 Avast Software, licensed under the MIT license
- */
-
-#ifndef DEMANGLER_DEMANGLERL_H
-#define DEMANGLER_DEMANGLERL_H
-
-#include
-#include
-
-#include "demangler/gparser.h"
-
-namespace demangler {
-
-/**
- * The grammar parser class - the core of the demangler.
- */
-class CDemangler {
- cGram *pGram;
- cName *pName;
- std::string compiler = "gcc";
- cGram::errcode errState; /// error state; 0 = everyting is ok
-
-public:
- CDemangler(std::string gname, bool i = true);
- static std::unique_ptr createGcc(bool i = true);
- static std::unique_ptr createMs(bool i = true);
- static std::unique_ptr createBorland(bool i = true);
- virtual ~CDemangler();
-
- bool isOk();
- std::string printError();
- void resetError();
-
- void createGrammar(std::string inputfilename, std::string outputname);
- cName *demangleToClass(std::string inputName);
- std::string demangleToString(std::string inputName);
- void setSubAnalyze(bool x);
-};
-
-} // namespace demangler
-
-#endif
diff --git a/3rdparty/demangler/include/demangler/demglobal.h b/3rdparty/demangler/include/demangler/demglobal.h
deleted file mode 100644
index 9fbdbbdd59..0000000000
--- a/3rdparty/demangler/include/demangler/demglobal.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * @file include/demangler/demglobal.h
- * @brief Global variables in demangler namespace.
- * @copyright (c) 2017 Avast Software, licensed under the MIT license
- */
-
-#ifndef DEMANGLER_DEMGLOBAL_H
-#define DEMANGLER_DEMGLOBAL_H
-
-#include "demangler/igrams.h"
-
-namespace demangler {
-
-extern cGram::igram_t internalGrammarStruct;
-extern cIgram_msll* igram_msll;
-extern cIgram_gccll* igram_gccll;
-
-} // namespace demangler
-
-#endif
diff --git a/3rdparty/demangler/include/demangler/demtools.h b/3rdparty/demangler/include/demangler/demtools.h
deleted file mode 100644
index 2bbcade545..0000000000
--- a/3rdparty/demangler/include/demangler/demtools.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * @file include/demangler/demtools.h
- * @brief Tools and extra functions for demangler.
- * @copyright (c) 2017 Avast Software, licensed under the MIT license
- */
-
-#ifndef DEMANGLER_DEMTOOLS_H
-#define DEMANGLER_DEMTOOLS_H
-
-#include
-
-namespace demangler {
-
-/**
- * @brief Structure for date and time.
- */
-struct sdate_t {
- unsigned int y = 0;
- unsigned int m = 0;
- unsigned int d = 0;
- unsigned int h = 0;
- unsigned int min = 0;
- unsigned int s = 0;
-};
-
-bool fileExists(const std::string &filename);
-
-void initSdate_t(sdate_t &x);
-
-sdate_t genTimeStruct();
-
-void xreplace(std::string &source, const std::string &tobereplaced, const std::string &replacement);
-
-} // namespace demangler
-
-#endif
diff --git a/3rdparty/demangler/include/demangler/gparser.h b/3rdparty/demangler/include/demangler/gparser.h
deleted file mode 100644
index 860be584a1..0000000000
--- a/3rdparty/demangler/include/demangler/gparser.h
+++ /dev/null
@@ -1,830 +0,0 @@
-/**
- * @file include/demangler/gparser.h
- * @brief Parser of LL grammar.
- * @copyright (c) 2017 Avast Software, licensed under the MIT license
- */
-
-#ifndef DEMANGLER_GPARSER_H
-#define DEMANGLER_GPARSER_H
-
-#include