src: use __FUNCSIG__ on Windows in backtrace

To show function signature if possible.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Joyee Cheung authored and GitHub committed 2024-05-29 21:11:59 +00:00
1 parent 534c122de1
commit 0a3f930065
1 file changed
+4
+4
View File
@@ -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)