microsoft / clrmd

Microsoft.Diagnostics.Runtime is a set of APIs for introspecting processes and dumps.
MIT License
1.05k stars 255 forks source link

ClrInfoProvider.IsSupportedRuntime, etc. needs MacOS support #697

Closed mikem8361 closed 2 years ago

mikem8361 commented 4 years ago

ClrInfoProvider.IsSupportedRuntime needs to work for MacOS target by checking for "libcoreclr.dylib" and "libcoreclr.so". The extension is the only thing that distinguishing the two OSs. Not sure how that will work under dbgeng because it strips the extension (like on Windows) for modules even for Linux coredumps.

ClrInfoProvider.TryGetModuleName has a nit. Lower casing the module name isn't technically correct on Linux/MacOS because the file systems are case sensitive but it is unlikely that some customer would have a "LibCoreClr" module of there own.

ClrInfoProvider.GetDacFileName needs to return the MacOS DAC name for OSPlatform.OSX.

There might be a few other places that need tweaks for MacOS core dumps (both the intermediate ELF core ones and the future MachO ones).

leculver commented 4 years ago

@mikem8361 How far along are you on the os x dump writer support? I have a mac laptop at home. My plan here is to finish this work and support os x as soon as your work goes into the dotnet runtime.

mikem8361 commented 4 years ago

The OSX dump writer isn't really in-plan for 5.0 createdump. We didn't have the bandwidth to do it and a macos reader in clrmd which is why we chose the ELF coredump route. It looks like there is a lot more progress made on the clrmd reader side than I thought or know at the time, but the 5.0 code complete dead lines are coming and I still have runtime work to finish the createdump support (see issue #34916).