-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cdac] Implement ISOSDacInterface2::GetObjectExceptionData (#104343)
- Make cDac implement `ISOSDacInterface2` - Add `Exception` (managed type) to data descriptor - Add `GetExceptionData` to `Exception` contract which gets all the data that SOS-DAC API uses
- Loading branch information
1 parent
5795e8c
commit e733c2f
Showing
12 changed files
with
218 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 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 Exception : IData<Exception> | ||
{ | ||
static Exception IData<Exception>.Create(Target target, TargetPointer address) | ||
=> new Exception(target, address); | ||
|
||
public Exception(Target target, TargetPointer address) | ||
{ | ||
Target.TypeInfo type = target.GetTypeInfo(DataType.Exception); | ||
|
||
Message = target.ReadPointer(address + (ulong)type.Fields["_message"].Offset); | ||
InnerException = target.ReadPointer(address + (ulong)type.Fields["_innerException"].Offset); | ||
StackTrace = target.ReadPointer(address + (ulong)type.Fields["_stackTrace"].Offset); | ||
WatsonBuckets = target.ReadPointer(address + (ulong)type.Fields["_watsonBuckets"].Offset); | ||
StackTraceString = target.ReadPointer(address + (ulong)type.Fields["_stackTraceString"].Offset); | ||
RemoteStackTraceString = target.ReadPointer(address + (ulong)type.Fields["_remoteStackTraceString"].Offset); | ||
HResult = target.Read<int>(address + (ulong)type.Fields["_HResult"].Offset); | ||
XCode = target.Read<int>(address + (ulong)type.Fields["_xcode"].Offset); | ||
} | ||
|
||
public TargetPointer Message { get; init; } | ||
public TargetPointer InnerException { get; init; } | ||
public TargetPointer StackTrace { get; init; } | ||
public TargetPointer WatsonBuckets { get; init; } | ||
public TargetPointer StackTraceString { get; init; } | ||
public TargetPointer RemoteStackTraceString { get; init; } | ||
public int HResult { get; init; } | ||
public int XCode { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters