mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-26 13:02:07 +00:00
Add -B/--backtrace option to RGBASM and RGBLINK (#1787)
This commit is contained in:
@@ -43,7 +43,8 @@ struct FileStackNode {
|
||||
FileStackNode(FileStackNodeType type_, std::variant<std::vector<uint32_t>, std::string> data_)
|
||||
: type(type_), data(data_) {}
|
||||
|
||||
std::string const &dump(uint32_t curLineNo) const;
|
||||
void printBacktrace(uint32_t curLineNo) const;
|
||||
std::vector<std::pair<std::string, uint32_t>> backtrace(uint32_t curLineNo) const;
|
||||
std::string reptChain() const;
|
||||
};
|
||||
|
||||
@@ -51,7 +52,7 @@ struct MacroArgs;
|
||||
|
||||
void fstk_VerboseOutputConfig();
|
||||
|
||||
bool fstk_DumpCurrent();
|
||||
void fstk_TraceCurrent();
|
||||
std::shared_ptr<FileStackNode> fstk_GetFileStack();
|
||||
std::shared_ptr<std::string> fstk_GetUniqueIDStr();
|
||||
MacroArgs *fstk_GetCurrentMacroArgs();
|
||||
|
||||
@@ -133,7 +133,7 @@ void lexer_ReachELSEBlock();
|
||||
|
||||
void lexer_CheckRecursionDepth();
|
||||
uint32_t lexer_GetLineNo();
|
||||
void lexer_DumpStringExpansions();
|
||||
void lexer_TraceStringExpansions();
|
||||
|
||||
struct Capture {
|
||||
uint32_t lineNo;
|
||||
|
||||
@@ -74,11 +74,10 @@ void fatal(char const *fmt, ...);
|
||||
[[gnu::format(printf, 1, 2)]]
|
||||
void error(char const *fmt, ...);
|
||||
|
||||
// Used for errors that make it impossible to assemble correctly, but don't
|
||||
// affect the following code. The code will fail to assemble but the user will
|
||||
// get a list of all errors at the end, making it easier to fix all of them at
|
||||
// once.
|
||||
void error(std::function<void()> callback);
|
||||
// Used for errors that handle their own backtrace output. The code will fail
|
||||
// to assemble but the user will get a list of all errors at the end, making it
|
||||
// easier to fix all of them at once.
|
||||
void errorNoTrace(std::function<void()> callback);
|
||||
|
||||
void requireZeroErrors();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user