Open
Implement IXCLRDataExceptionState.GetManagedObject in cDAC#131334
Conversation
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
rcj1
marked this pull request as ready for review
July 24, 2026 18:12
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
noahfalk
reviewed
Jul 24, 2026
| int hr = HResults.S_OK, hrLocal = HResults.S_OK; | ||
| IXCLRDataValue? legacyValue = null; | ||
|
|
||
| if (_legacyImpl is not null) |
Member
There was a problem hiding this comment.
We shouldn't fallback to the legacy implementation without first testing LegacyFallbackHelper.CanFallback(). Is it useful to have a partial implementation of this method that still relies on the fallback? It seems a little clearer if we left the previous fallback behavior in place until we had an implementation that didn't rely on any fallback.
Contributor
There was a problem hiding this comment.
It looks like we didn’t update the debug validation to test CanFallback() anywhere, I will do that here and then put up a PR to do that everywhere
Comment on lines
+267
to
+271
| uint locationFlags; | ||
| ClrDataAddress location; | ||
| Assert.Equal(HResults.S_OK, value.Interface.GetLocationByIndex(0, &locationFlags, &location)); | ||
| Assert.Equal(ClrDataVLocFlag.CLRDATA_VLOC_MEMORY, locationFlags); | ||
| Assert.Equal(s_exceptionObjectAddress.ToClrDataAddress(target), location); |
Comment on lines
+132
to
+145
| if (_thrownObjectHandle == TargetPointer.Null) | ||
| throw new ArgumentException(); | ||
|
|
||
| TargetPointer exceptionObject; | ||
| try | ||
| { | ||
| exceptionObject = _target.ReadPointer(_thrownObjectHandle); | ||
| } | ||
| catch (VirtualReadException) | ||
| { | ||
| throw new ArgumentException(); | ||
| } | ||
|
|
||
| ulong objectSize = _target.Contracts.Object.GetSize(exceptionObject); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements managed exception object retrieval in cDAC with legacy DAC-compatible behavior.
ClrDataValue.E_INVALIDARGusing cDAC exception conventions.E_POINTERfor null output parameters.Note
This description was generated with GitHub Copilot.