-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Demangle RTTI type names in debug messages #52633
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BrettDong
added
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Code: Debug
Debugging and troubleshooting the game, also includes the debug menu
labels
Nov 4, 2021
This was referenced Mar 29, 2023
scarf005
added a commit
to scarf005/Cataclysm-BN
that referenced
this pull request
Aug 30, 2023
demangle RTTI type names in debug messages from: CleverRaven/Cataclysm-DDA#52633 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com>
scarf005
added a commit
to scarf005/Cataclysm-BN
that referenced
this pull request
Aug 31, 2023
demangle RTTI type names in debug messages from: CleverRaven/Cataclysm-DDA#52633 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com>
scarf005
added a commit
to scarf005/Cataclysm-BN
that referenced
this pull request
Sep 1, 2023
demangle RTTI type names in debug messages from: CleverRaven/Cataclysm-DDA#52633 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com>
Firestorm01X2
pushed a commit
to cataclysmbnteam/Cataclysm-BN
that referenced
this pull request
Sep 3, 2023
* chore: unindent common messages was very confusing with `CMAKE_BUILD_TYPE` * fix(port): BSD macro in src/debug.cpp from: CleverRaven/Cataclysm-DDA#47440 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * fix(port): Implement C++ symbol demangling on macOS from: CleverRaven/Cataclysm-DDA#47486 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * refactor(port): Extract symbol demangling to a separate function from: CleverRaven/Cataclysm-DDA#47517 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * feat(port): Demangle symbol names on MinGW from: CleverRaven/Cataclysm-DDA#47517 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * feat(port): Implement C++ symbol demangling on Linux from: CleverRaven/Cataclysm-DDA#47621 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * feat(port): Implement C++ symbol demangling on FreeBSD and OpenBSD from: CleverRaven/Cataclysm-DDA#48152 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * fix(port): C++ symbol demangling on cross-compile MinGW from: CleverRaven/Cataclysm-DDA#48220 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * fix(port): memory leak in demangle() from: CleverRaven/Cataclysm-DDA#48230 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * feat(port): Backtrace on Android from: CleverRaven/Cataclysm-DDA#48371 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * chore(port): hide write_demangled_frame() for Android build from: CleverRaven/Cataclysm-DDA#48414 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * feat(port): demangle RTTI type names in debug messages from: CleverRaven/Cataclysm-DDA#52633 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * perf(port): optimize null stream in DebugLog from: CleverRaven/Cataclysm-DDA#55156 Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> * fix(port): reported version of newer Windows 10 releases from: CleverRaven/Cataclysm-DDA#55506 Co-authored-by: xuv <18742123+xuvatilavv@users.noreply.github.com> * feat(port): include build number in windows version report CleverRaven/Cataclysm-DDA#55646 Co-authored-by: xuv <18742123+xuvatilavv@users.noreply.github.com> * feat(port): get the actual static image base of modules from: CleverRaven/Cataclysm-DDA#55782 Co-authored-by: Qrox <qrox@sina.com> * ci: fix version typo * feat(port): support libbacktrace on linux from: CleverRaven/Cataclysm-DDA#59020 Co-authored-by: John Bytheway <jbytheway@gmail.com> * build(cmake): support custom linker context: https://stackoverflow.com//questions/1867745/cmake-use-a-custom-linker#answer-66730019 * docs(cmake): linker, backtrace and libbacktrace --------- Co-authored-by: Brett Dong <brett.browning.dong@gmail.com> Co-authored-by: xuv <18742123+xuvatilavv@users.noreply.github.com> Co-authored-by: Qrox <qrox@sina.com> Co-authored-by: John Bytheway <jbytheway@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Debug
Debugging and troubleshooting the game, also includes the debug menu
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Infrastructure "Demangle RTTI type names in debug messages"
Purpose of change
In GCC and Clang,
typeid( X ).name()
returns mangled names, so debug messages showing RTTI type names may look a little bit confusing:Describe the solution
Move
demangle()
function to a separate source/header file to avoid circular dependency between string formatter anddebug.h
, and calldemangle()
where RTTI type names are included in debug messages.Describe alternatives you've considered
Testing
Additional context