-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
DotNetRuntimeContractDescriptor
address from the targetDepends on #100650 to actually work.
Contributes to #99298