Repository navigation
Unify RGBASM and RGBLINK fstack node backtrace printing methods into one generic function - #2253
Merged
Merged
Conversation
Contributor
Author
|
Confirmed that this works on Apple OSes older than what CI provides (macOS 11 with clang++ 22, and Mac OS X 10.8 with g++ 14, both available on MacPorts). |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
RGBASM and RGBLINK each declare their own
struct FileStackNode, with many similarities but enough differences that we haven't totally unified them. However, both of them were separately implementing aprintBacktracemethod to derive a stack of "trace nodes" from their ancestry of parent nodes, and then calltrace_PrintBacktraceto render it. Those twoprintBacktraceimplementations were almost completely identical, except for whether the parent nodes were behindshared_ptrs or regular pointers, and whether the ancestry was inreversedorder or not.This PR unifies them as one generic
trace_PrintFstackNodeBacktracefunction. Note thattrace_PrintBacktracebecause it's also needed for printing backtraces of linkerscript nodes, which are less complicated than fstack nodes and don't need to construct their trace node history on the fly from rept/macro/file node ancestors -- theirINCLUDEd ancestors already are sufficient for printing as-is.