[cdac] Read contract descriptor from target#101208
Conversation
|
Tagging subscribers to this area: @tommcdon |
294072a to
faa1722
Compare
|
Please consider cherrypicking lambdageek@dad6f1e from https://github.com/lambdageek/runtime/tree/cdac-roundtrip-main to hook up JSON parser |
Until we get dotnet#101048 from codeflow, work around dotnet#101205 by adding a trimmer root for JsonDerivedTypeAttribute[].
|
Cherry-picked the JSON parser change. One edit I made on top of that was to make the |
|
This change is also disabling the cDAC on platforms where we don't read export symbols via
runtime/src/coreclr/debug/dbgutil/CMakeLists.txt Lines 20 to 23 in 907eff8 @mikem8361 do you know if there's a specific reason elfreader shouldn't work on other Unix platforms?
I could include it in freebsd with something like elinor-fung@18a7dee. That builds, but I don't know if it actually works. |
The ELFReader should work just fine other platforms but it will just take some work/testing. |
| for (int i = 0; i < pointerDataCount; i++) | ||
| { | ||
| _pointerData[i] = ReadPointer(pointerData.Value + (uint)(i * _pointerSize)); | ||
| if (!TryReadPointer(pointerDataAddr.Value + (uint)(i * pointerSize), config, reader, out pointerData[i])) |
There was a problem hiding this comment.
something to consider as we go forward: should we have a struct TargetSpan<T> where T: unmanaged for "pointer+length" for remote memory
- Get `DotNetRuntimeContractDescriptor` address from the target - Read contract descriptor to determine endianness and pointer size - Parse JSON descriptor and store contracts
- Get `DotNetRuntimeContractDescriptor` address from the target - Read contract descriptor to determine endianness and pointer size - Parse JSON descriptor and store contracts
DotNetRuntimeContractDescriptoraddress from the targetDepends on #100650 to actually work.
Contributes to #99298