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

MacOS createdump and createdump cleanup. #37224

Merged
merged 6 commits into from
Jun 3, 2020

Conversation

mikem8361
Copy link
Member

@mikem8361 mikem8361 commented May 31, 2020

Add MachO in-memory module reader (MachOReader).

Refactor CrashInfo and ThreadInfo in Unix and MacOS versions.

Converted the char* name fields (process name in CrashInfo and module name in MemoryRegion) to std::string for easier cleanup and usage.

Removed the vestiges of the SOS support (the m_sos flag, ThreadInfo::GetRegistersWithDataTarget(), etc.).

Moved the Linux read memory code out of the DataTarget into CrashInfo. DataTarget is now a thin wrapper around CrashInfo.

In the dumpwriter, fix the "number of program headers" calculate to just the ones backed by memory. Only write the memory regions backed by memory. This makes lldb fail the memory read in these regions instead of returning zeros.

Removed the TRACE macro from the ElfReader; use the Trace() virtual method directly.

First step in issue: #34916

@ghost
Copy link

ghost commented May 31, 2020

Tagging subscribers to this area: @tommcdon
Notify danmosemsft if you want to be subscribed.

src/coreclr/src/debug/createdump/createdump.h Show resolved Hide resolved
src/coreclr/src/inc/arrayholder.h Outdated Show resolved Hide resolved
Copy link
Member

@hoyosjs hoyosjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some questions/comments :) Thanks, Mike!

src/coreclr/src/debug/createdump/createdump.h Show resolved Hide resolved
src/coreclr/src/debug/createdump/createdump.cpp Outdated Show resolved Hide resolved
src/coreclr/src/debug/createdump/createdump.cpp Outdated Show resolved Hide resolved
@mikem8361 mikem8361 requested a review from hoyosjs June 2, 2020 22:22
mikem@microsoft.com added 6 commits June 2, 2020 18:22
Converted the char* name fields (process name in CrashInfo and module name in MemoryRegion) to std::string for easier cleanup and usage.

Removed the vestiges of the SOS support (the m_sos flag, ThreadInfo::GetRegistersWithDataTarget(), etc.).

Moved the Linux read memory code out of the DataTarget into CrashInfo. DataTarget is now a thin wrapper around CrashInfo.

In the dumpwriter, fix the "number of program headers" calculate to just the ones backed by memory. Only write the memory regions backed by memory.  This makes lldb fail the memory read in these regions instead of returning zeros.

Removed the TRACE macro from the ElfReader; use the Trace() virtual method directly.
Add MachO in-memory module reader (MachOReader).

Refactor CrashInfo and ThreadInfo in Unix and MacOS versions.
Add unwind and eh frame info to coredump
@mikem8361 mikem8361 merged commit 2f563e3 into dotnet:master Jun 3, 2020
@mikem8361 mikem8361 deleted the maccreatedump branch June 3, 2020 16:51
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants