File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ static uint64_t GetBaseAddress()
146146 return 0 ;
147147}
148148
149+ #ifdef ENABLE_STACKTRACES
149150// PC addresses returned by StackWalk64 are in the real mapped space, while libbacktrace expects them to be in the
150151// default mapped space starting at 0x400000. This method converts the address.
151152// TODO this is probably the same reason libbacktrace is not able to gather the stacktrace on Windows (returns pointers like 0x1 or 0xfffffff)
@@ -161,6 +162,7 @@ static uint64_t ConvertAddress(uint64_t addr)
161162 uint64_t offset = addr - hMod;
162163 return 0x400000 + offset;
163164}
165+ #endif // ENABLE_STACKTRACES
164166
165167static __attribute__ ((noinline)) std::vector<uint64_t> GetStackFrames(size_t skip, size_t max_frames, const CONTEXT* pContext = nullptr )
166168{
You can’t perform that action at this time.
0 commit comments