Skip to content

Commit aace5f7

Browse files
Support Windows 32-bit (and other smaller fixes)
1 parent fd5a984 commit aace5f7

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

libcxx/include/__stacktrace/basic_stacktrace.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10-
#ifndef _LIBCPP_STACKTRACE_BASIC
11-
#define _LIBCPP_STACKTRACE_BASIC
10+
#ifndef _LIBCPP_BASIC_STACKTRACE_H
11+
#define _LIBCPP_BASIC_STACKTRACE_H
1212

1313
#include <__config>
1414

@@ -339,4 +339,4 @@ _LIBCPP_END_NAMESPACE_STD
339339

340340
_LIBCPP_POP_MACROS
341341

342-
#endif // _LIBCPP_STACKTRACE_BASIC
342+
#endif // _LIBCPP_BASIC_STACKTRACE_H

libcxx/include/__stacktrace/stacktrace_entry.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10-
#ifndef _LIBCPP_STACKTRACE_ENTRY
11-
#define _LIBCPP_STACKTRACE_ENTRY
10+
#ifndef _LIBCPP_STACKTRACE_ENTRY_H
11+
#define _LIBCPP_STACKTRACE_ENTRY_H
1212

1313
#include <__config>
1414

@@ -208,4 +208,4 @@ _LIBCPP_END_NAMESPACE_STD
208208

209209
_LIBCPP_POP_MACROS
210210

211-
#endif // _LIBCPP_STACKTRACE_ENTRY
211+
#endif // _LIBCPP_STACKTRACE_ENTRY_H

libcxx/src/stacktrace/impl_windows.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,12 @@ base::current_impl(size_t skip, size_t max_depth) {
171171
frame.AddrPC.Offset = ccx.Pc;
172172
frame.AddrStack.Offset = ccx.Sp;
173173
frame.AddrFrame.Offset = ccx.Fp;
174+
#elif defined(_M_IX86)
175+
frame.AddrPC.Offset = ccx.Eip;
176+
frame.AddrStack.Offset = ccx.Esp;
177+
frame.AddrFrame.Offset = ccx.Ebp;
174178
#else
175-
# warning stacktrace requires x86-64 or ARM64; returned stacktraces will be empty
179+
# warning unrecognized architecture; returned stacktraces will be empty
176180
return;
177181
#endif
178182

0 commit comments

Comments
 (0)