Created
June 20, 2023 05:44
-
-
Save epilys/a29daf5cc49f3ef7aadd082cc19d2655 to your computer and use it in GitHub Desktop.
dbg_macro.c
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
#define DBG(val) ({ typeof(val) _val = (val); fprintf(stderr, "[%s:%d] %s = ", __FILE__, __LINE__, #val); __builtin_dump_struct(&_val, fprintf, stderr); _val; }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source: https://floss.social/@bugaevc/110572466810699912