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: nodejs#53135
Refs: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
  • Loading branch information
joyeecheung authored and eliphazbouye committed Jun 20, 2024
1 parent da902db commit 994a421
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 @@ -163,8 +163,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 994a421

Please sign in to comment.