forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
push_error
and push_warning
print name of calling function
Currently, `push_error` and `push_warning` give themselve as the calling function, which is not useful for debugging. I have altered these to use the C stacktrace to get the name of the function that called them. This saves having to turn these functions into macros, which would require recompiling every single piece of code that uses them. I have also set it to, when debug symbols are available, use them with `atos` (available on macOS) to find the exact source file and line being called from. It should be possible to the same thing on Linux using `addr2line`, but I don't have a Linux box handy to test that. I am not sure how you would implement this in Windows. I have tested this on macOS Sonoma 14.5 (23F79). It should work on any *nix system. I am not sure about Windows. Fixes godotengine#76770
- Loading branch information
Showing
4 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
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