Skip to content

Commit d117746

Browse files
committed
Adjust windows & fix tests
1 parent 3b6d168 commit d117746

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

profiler/src/ProfilerEngine/Datadog.Profiler.Native/CrashReporting.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,17 @@ int32_t CrashReporting::ResolveStacks(int32_t crashingThreadId, ResolveManagedCa
258258
CHECK_RESULT(ddog_crasht_StackFrame_with_ip(&frame, currentFrame.ip));
259259
CHECK_RESULT(ddog_crasht_StackFrame_with_sp(&frame, currentFrame.sp));
260260
CHECK_RESULT(ddog_crasht_StackFrame_with_module_base_address(&frame, currentFrame.moduleAddress));
261-
// relative address will be computed by libdatadog when calling normalize_ips
261+
#ifdef _WINDOWS
262+
CHECK_RESULT(ddog_crasht_StackFrame_with_relative_address(&frame, currentFrame.ip - currentFrame.moduleAddress));
263+
#endif
262264

263265
CHECK_RESULT(ddog_crasht_StackFrame_with_symbol_address(&frame, currentFrame.symbolAddress));
264266

265267
auto buildId = currentFrame.buildId;
266268
if (buildId.size() != 0)
267269
{
268270
#ifdef _WINDOWS
271+
CHECK_RESULT(ddog_crasht_StackFrame_with_build_id(&frame, {buildId.data(), buildId.size()}));
269272
CHECK_RESULT(ddog_crasht_StackFrame_with_build_id_type(&frame, DDOG_CRASHT_BUILD_ID_TYPE_PDB));
270273
#endif
271274
}

0 commit comments

Comments
 (0)