Skip to content

Commit 1886fe9

Browse files
joyeecheungtargos
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 33242ff commit 1886fe9

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
@@ -163,8 +163,12 @@ void DumpJavaScriptBacktrace(FILE* fp);
163163
#else
164164
#define LIKELY(expr) expr
165165
#define UNLIKELY(expr) expr
166+
#if defined(_MSC_VER)
167+
#define PRETTY_FUNCTION_NAME __FUNCSIG__
168+
#else
166169
#define PRETTY_FUNCTION_NAME ""
167170
#endif
171+
#endif
168172

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

0 commit comments

Comments
 (0)