-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[cdac] Implement ISOSDacInterface::GetNestedExceptionData #103668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,7 @@ static IContract IContract.Create(Target target, int version) | |
public virtual ThreadStoreData GetThreadStoreData() => throw new NotImplementedException(); | ||
public virtual ThreadStoreCounts GetThreadCounts() => throw new NotImplementedException(); | ||
public virtual ThreadData GetThreadData(TargetPointer thread) => throw new NotImplementedException(); | ||
public virtual TargetPointer GetExceptionInfo(TargetPointer exception, out TargetPointer nextNestedException) => throw new NotImplementedException(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW: The StackTraceElement details are changing in #103076 |
||
} | ||
|
||
internal readonly struct Thread : IThread | ||
|
@@ -127,10 +128,17 @@ ThreadData IThread.GetThreadData(TargetPointer threadPointer) | |
thread.Frame, | ||
firstNestedException, | ||
thread.TEB, | ||
thread.LastThrownObject, | ||
thread.LastThrownObject.Handle, | ||
GetThreadFromLink(thread.LinkNext)); | ||
} | ||
|
||
TargetPointer IThread.GetExceptionInfo(TargetPointer exception, out TargetPointer nextNestedException) | ||
{ | ||
Data.ExceptionInfo exceptionInfo = _target.ProcessedData.GetOrAdd<Data.ExceptionInfo>(exception); | ||
nextNestedException = exceptionInfo.PreviousNestedInfo; | ||
return exceptionInfo.ThrownObject.Object; | ||
} | ||
|
||
private TargetPointer GetThreadFromLink(TargetPointer threadLink) | ||
{ | ||
if (threadLink == TargetPointer.Null) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Microsoft.Diagnostics.DataContractReader.Data; | ||
|
||
internal sealed class ObjectHandle : IData<ObjectHandle> | ||
{ | ||
static ObjectHandle IData<ObjectHandle>.Create(Target target, TargetPointer address) | ||
=> new ObjectHandle(target, address); | ||
|
||
public ObjectHandle(Target target, TargetPointer address) | ||
{ | ||
Handle = address; | ||
if (address != TargetPointer.Null) | ||
Object = target.ReadPointer(address); | ||
} | ||
|
||
public TargetPointer Handle { get; init; } | ||
public TargetPointer Object { get; init; } = TargetPointer.Null; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.