Skip to content
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

Getting IL and Native Code Addresses... #1049

Open
davidcorbin-atmosera opened this issue Nov 28, 2022 · 3 comments
Open

Getting IL and Native Code Addresses... #1049

davidcorbin-atmosera opened this issue Nov 28, 2022 · 3 comments

Comments

@davidcorbin-atmosera
Copy link

// Unfortunately there's not a great way to get the size of the code, or the end address. // This is partly due to the fact that we don't *have* to put all the JIT'ed code into one // contiguous chunk, though I think an implementation detail is that we actually do. // You are supposed to do code flow analysis like "uf" in windbg to find the size, but // in practice you can use the IL to native mapping:
However, the related code does NOT look right.... It seems to be getting the memory for a METHOD, and that method may not even be related to the TYPE (it is always looking at GetHashCode)...

Am I Missing something?

@leculver
Copy link
Contributor

leculver commented Dec 7, 2022

Can you point me to the code you are referring to?

@davidcorbin-atmosera
Copy link
Author

davidcorbin-atmosera commented Dec 8, 2022

@leculver - Thanks for the response. I think it was one of the samples, and am currently going back to find the original source material. This is hampered because many of the links (e.g. those on the FAQ.md page) are broken (they appear to still reference a "master" branch which has not been rtenamed to "main)....That should probably be a distinct issue...

I will keep you posted...

UPDATE: I have found a site that references the martial I am talking about, but is not the original source (still looking) https://experimentation.readthedocs.io/en/latest/MachineCode/. Seems like there are a "bunch of funnies"

UPDATE2: Apparently (from what I can determine) it was here: https://github.com/microsoft/dotnet-samples which has a now broken link to https://github.com/microsoft/dotnet-samples/blob/master/Microsoft.Diagnostics.Runtime/CLRMD - I have found this information from various forks... still trying to determine where I originally got it from, but hopefully this provides context.

@leculver
Copy link
Contributor

leculver commented Dec 8, 2022

Thanks! I'm just now starting a sprint of ClrMD work. I'll take a look at this as soon as I'm done with the current in-flight NativeAOT support...but that may take me a few days to churn through. I'll see if I can get the links updated too. There's already an issue tracking that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants