Skip to content

Commit 260d8d9

Browse files
joyeecheungmarco-ippolito
authored andcommitted
src: use __FUNCSIG__ on Windows in backtrace
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]>
1 parent 28e71ed commit 260d8d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ void DumpJavaScriptBacktrace(FILE* fp);
162162
#else
163163
#define LIKELY(expr) expr
164164
#define UNLIKELY(expr) expr
165+
#if defined(_MSC_VER)
166+
#define PRETTY_FUNCTION_NAME __FUNCSIG__
167+
#else
165168
#define PRETTY_FUNCTION_NAME ""
166169
#endif
170+
#endif
167171

168172
#define STRINGIFY_(x) #x
169173
#define STRINGIFY(x) STRINGIFY_(x)

0 commit comments

Comments
 (0)