Merge pull request #1087 from KlzXS/debug

Fix debug line number
This commit is contained in:
Piña Colada 2021-06-29 23:59:30 +05:30 committed by GitHub
commit 2fda5c78e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -79,10 +79,10 @@ static void disabledbg(void)
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#define DPRINTF_D(x) xprintf(DEBUG_FD, "ln " TOSTRING(__line__) ": " #x "=%d\n", x)
#define DPRINTF_U(x) xprintf(DEBUG_FD, "ln " TOSTRING(__line__) ": " #x "=%u\n", x)
#define DPRINTF_S(x) xprintf(DEBUG_FD, "ln " TOSTRING(__line__) ": " #x "=%s\n", x)
#define DPRINTF_P(x) xprintf(DEBUG_FD, "ln " TOSTRING(__line__) ": " #x "=%p\n", x)
#define DPRINTF_D(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%d\n", x)
#define DPRINTF_U(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%u\n", x)
#define DPRINTF_S(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%s\n", x)
#define DPRINTF_P(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%p\n", x)
#else
#define DPRINTF_D(x)
#define DPRINTF_U(x)