Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GNU C++ demangler #1834

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@
[submodule "third_party/uriparser"]
path = third_party/uriparser
url = https://github.com/uriparser/uriparser.git
[submodule "third_party/PEGTL"]
path = third_party/PEGTL
url = https://github.com/taocpp/PEGTL.git
1 change: 1 addition & 0 deletions LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ find a link to the vendored version itself.
- [nanosvg](https://github.com/memononen/nanosvg) ([vendored](https://github.com/grumpycoders/nanosvg))
- [nanovg](https://github.com/memononen/nanovg) ([vendored](https://github.com/grumpycoders/nanovg))
- [noto](https://fonts.google.com/noto) ([vendored](https://github.com/grumpycoders/pcsx-redux/tree/main/third_party/noto))
- [PEGTL](https://github.com/taocpp/PEGTL)
- [pprint.lua](https://github.com/jagt/pprint.lua) ([vendored](https://github.com/grumpycoders/pcsx-redux/tree/main/third_party/pprint.lua))
- [stb](https://github.com/nothings/stb)
- [tracy](https://github.com/wolfpld/tracy)
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ CPPFLAGS += -Ithird_party/luajit/src
CPPFLAGS += -Ithird_party/luv/src
CPPFLAGS += -Ithird_party/luv/deps/lua-compat-5.3/c-api
CPPFLAGS += -Ithird_party/md4c/src
CPPFLAGS += -Ithird_party/PEGTL/include
CPPFLAGS += -Ithird_party/ucl -Ithird_party/ucl/include
CPPFLAGS += -Ithird_party/uriparser/include
CPPFLAGS += -Ithird_party/zep/extensions
Expand Down
372 changes: 372 additions & 0 deletions src/support/gnu-c++-demangler.cc

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions src/support/gnu-c++-demangler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*

MIT License

Copyright (c) 2025 PCSX-Redux authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update the copyright year.

The copyright year is set to 2025, which is in the future. Please update it to the current year (2024).

-Copyright (c) 2025 PCSX-Redux authors
+Copyright (c) 2024 PCSX-Redux authors
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Copyright (c) 2025 PCSX-Redux authors
Copyright (c) 2024 PCSX-Redux authors


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/

#pragma once

#include <string>
#include <string_view>

namespace PCSX {

namespace GNUDemangler {

bool internalCheck();
void trace(std::string_view mangled);
std::string demangle(std::string_view mangled);

} // namespace GNUDemangler

} // namespace PCSX
1 change: 1 addition & 0 deletions third_party/PEGTL
Submodule PEGTL added at be5273
2 changes: 1 addition & 1 deletion vsprojects/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemDefinitionGroup>
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(SolutionDir)..\;$(SolutionDir)..\src;$(SolutionDir)..\third_party;$(SolutionDir)..\third_party\curl\include;$(SolutionDir)..\third_party\ConcurrentQueue;$(SolutionDir)..\third_party\capstone\include\capstone;$(SolutionDir)..\third_party\googletest\googletest\include;$(SolutionDir)..\third_party\ELFIO;$(SolutionDir)..\third_party\expected\include;$(SolutionDir)..\third_party\fmt\include;$(SolutionDir)..\third_party\freetype\include;$(SolutionDir)..\third_party\gl3w;$(SolutionDir)..\third_party\imgui;$(SolutionDir)..\third_party\imgui\backends;$(SolutionDir)..\third_party\imgui\misc\cpp;$(SolutionDir)..\third_party\libuv\include;$(SolutionDir)..\third_party\libuv\src;$(SolutionDir)..\third_party\md4c\src;$(SolutionDir)..\third_party\SDL\include;$(SolutionDir)..\third_party\uriparser\include;$(SolutionDir)..\third_party\uvw\src;$(SolutionDir)..\third_party\xbyak\xbyak;$(SolutionDir)..\third_party\zep\extensions;$(SolutionDir)..\third_party\zep\include;$(SolutionDir)..\third_party\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)..\;$(SolutionDir)..\src;$(SolutionDir)..\third_party;$(SolutionDir)..\third_party\curl\include;$(SolutionDir)..\third_party\ConcurrentQueue;$(SolutionDir)..\third_party\capstone\include\capstone;$(SolutionDir)..\third_party\googletest\googletest\include;$(SolutionDir)..\third_party\ELFIO;$(SolutionDir)..\third_party\expected\include;$(SolutionDir)..\third_party\fmt\include;$(SolutionDir)..\third_party\freetype\include;$(SolutionDir)..\third_party\gl3w;$(SolutionDir)..\third_party\imgui;$(SolutionDir)..\third_party\imgui\backends;$(SolutionDir)..\third_party\imgui\misc\cpp;$(SolutionDir)..\third_party\libuv\include;$(SolutionDir)..\third_party\libuv\src;$(SolutionDir)..\third_party\md4c\src;$(SolutionDir)..\third_party\PEGTL\include;$(SolutionDir)..\third_party\SDL\include;$(SolutionDir)..\third_party\uriparser\include;$(SolutionDir)..\third_party\uvw\src;$(SolutionDir)..\third_party\xbyak\xbyak;$(SolutionDir)..\third_party\zep\extensions;$(SolutionDir)..\third_party\zep\include;$(SolutionDir)..\third_party\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<PreprocessorDefinitions>IMGUI_ENABLE_FREETYPE;IMGUI_DISABLE_OBSOLETE_KEYIO;HAVE_STDINT_H;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_GNU_SOURCE;NOMINMAX;WIN32;_WINDOWS;_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING;ZEP_FEATURE_CPP_FILE_SYSTEM;CURL_STATICLIB;BUILDING_LIBCURL;USE_WIN32_IDN;WANT_IDN_PROTOTYPES;USE_IPV6;USE_WINDOWS_SSPI;USE_SCHANNEL;PB_STATIC_API;WINVER=0x0602;_WIN32_WINNT=0x0602;URI_STATIC_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
Expand Down
Loading
Loading