Skip to content

Commit

Permalink
src: use __FUNCSIG__ on Windows in backtrace
Browse files Browse the repository at this point in the history
To show function signature if possible.

PR-URL: #53135
Refs: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Stefan Stojanovic <[email protected]>
  • Loading branch information
joyeecheung authored and marco-ippolito committed Jul 19, 2024
1 parent 28e71ed commit 260d8d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ void DumpJavaScriptBacktrace(FILE* fp);
#else
#define LIKELY(expr) expr
#define UNLIKELY(expr) expr
#if defined(_MSC_VER)
#define PRETTY_FUNCTION_NAME __FUNCSIG__
#else
#define PRETTY_FUNCTION_NAME ""
#endif
#endif

#define STRINGIFY_(x) #x
#define STRINGIFY(x) STRINGIFY_(x)
Expand Down

0 comments on commit 260d8d9

Please sign in to comment.