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

Generate MachO format dumps by the MacOS createdump #48664

Closed
Tracked by #5929
mikem8361 opened this issue Feb 23, 2021 · 1 comment
Closed
Tracked by #5929

Generate MachO format dumps by the MacOS createdump #48664

mikem8361 opened this issue Feb 23, 2021 · 1 comment
Assignees
Labels
area-Diagnostics-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@mikem8361
Copy link
Member

Currently createdump generates ELF core dumps on MacOS. We need to develop a MachO dump writer for the VS for Mac conversion to .NET Core.

@mikem8361 mikem8361 added enhancement Product code improvement that does NOT require public API changes/additions area-Diagnostics-coreclr labels Feb 23, 2021
@mikem8361 mikem8361 self-assigned this Feb 23, 2021
@ghost
Copy link

ghost commented Feb 23, 2021

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

Currently createdump generates ELF core dumps on MacOS. We need to develop a MachO dump writer for the VS for Mac conversion to .NET Core.

Author: mikem8361
Assignees: mikem8361
Labels:

area-Diagnostics-coreclr, enhancement

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Feb 23, 2021
@tommcdon tommcdon removed the untriaged New issue has not been triaged by the area owner label Feb 23, 2021
@tommcdon tommcdon added this to the 6.0.0 milestone Feb 23, 2021
mikem8361 added a commit to mikem8361/runtime that referenced this issue Apr 12, 2021
Instead of the hacky ELF core dumps on MacOS now createdump generates true MachO dumps.

Setting the COMPlus_DbgEnableElfDumpOnMacOS environment variable is no longer needed.

Add special thread info memory region containing the OS thread ids missing from macho core dumps. This allows SOS to map the thread indexes to thread ids. The address (0x7fffffff00000000) of this special memory region is above the highest user address (0x0007FFFFFFFFF000) and below a kernel reserved address (0xffffff8000xxxxxx) which is kind of moot because dumps don't include any kernel regions. lldb seems just fine with this memory region.

The changes include ARM64 support also, but since I don't have a M1 device I can't build/test them. I'm hoping Steve can at least review them.

Add --verbose/TRACE_VERBOSE support to tone down all the macho dump generation spew.

Issue: dotnet#48664
ghost pushed a commit that referenced this issue Apr 15, 2021
* Add MachO dump writer to createdump

Instead of the hacky ELF core dumps on MacOS now createdump generates true MachO dumps.

Setting the COMPlus_DbgEnableElfDumpOnMacOS environment variable is no longer needed.

Add special thread info memory region containing the OS thread ids missing from macho core dumps. This allows SOS to map the thread indexes to thread ids. The address (0x7fffffff00000000) of this special memory region is above the highest user address (0x0007FFFFFFFFF000) and below a kernel reserved address (0xffffff8000xxxxxx) which is kind of moot because dumps don't include any kernel regions. lldb seems just fine with this memory region.

The changes include ARM64 support also, but since I don't have a M1 device I can't build/test them. I'm hoping Steve can at least review them.

Add --verbose/TRACE_VERBOSE support to tone down all the macho dump generation spew.

Issue: #48664

* Fix build problem

* Update docs

* Code review feedback

Co-authored-by: Juan Sebastian Hoyos Ayala <juhoyosa@microsoft.com>
@ghost ghost locked as resolved and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Diagnostics-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

2 participants