Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/design/datacontracts/StackWalk.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public interface IStackDataFrameHandle
{
// Describes what the current Context/FrameIter of this handle represents.
StackWalkState State { get; }
bool IsActiveFrame { get; }
bool IsExceptionFrame { get; }
}

public enum StackWalkState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ namespace Microsoft.Diagnostics.DataContractReader.Contracts;
public interface IStackDataFrameHandle
{
StackWalkState State { get; }
bool IsActiveFrame { get; }
bool IsExceptionFrame { get; }
}

public enum StackWalkState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ private record StackDataFrameHandle(
TargetPointer FrameAddress,
ThreadData ThreadData,
bool IsResumableFrame = false,
bool IsActiveFrame = false) : IStackDataFrameHandle
bool IsActiveFrame = false,
bool IsExceptionFrame = false) : IStackDataFrameHandle
{ }

private class StackWalkData(IPlatformAgnosticContext context, StackWalkState state, FrameIterator frameIter, ThreadData threadData)
Expand Down Expand Up @@ -113,7 +114,9 @@ public StackDataFrameHandle ToDataFrame()
{
bool isResumable = IsCurrentFrameResumable();
bool isActiveFrame = IsFirst && State == StackWalkState.Frameless;
return new(Context.Clone(), State, FrameIter.CurrentFrameAddress, ThreadData, isResumable, isActiveFrame);
bool isExceptionFrame = State is StackWalkState.Frame or StackWalkState.SkippedFrame
&& FrameIter.GetCurrentFrameType() is FrameType.FaultingExceptionFrame or FrameType.SoftwareExceptionFrame;
return new(Context.Clone(), State, FrameIter.CurrentFrameAddress, ThreadData, isResumable, isActiveFrame, isExceptionFrame);
}
}

Expand Down
Loading
Loading