Skip to content

Commit

Permalink
Misc createdump fixes (dotnet#49038)
Browse files Browse the repository at this point in the history
* Misc createdump fixes

* Fixed issue dotnet#42589

* Code review feedback
  • Loading branch information
mikem8361 authored Mar 4, 2021
1 parent ba8ce9e commit c641d97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/debug/createdump/crashinfounix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ CrashInfo::GetDSOInfo()
void
CrashInfo::VisitModule(uint64_t baseAddress, std::string& moduleName)
{
if (baseAddress == 0 || baseAddress == m_auxvValues[AT_SYSINFO_EHDR] || baseAddress == m_auxvValues[AT_BASE]) {
if (baseAddress == 0 || baseAddress == m_auxvValues[AT_SYSINFO_EHDR]) {
return;
}
if (m_coreclrPath.empty())
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/debug/createdump/createdumpunix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CreateDump(const char* dumpPathTemplate, int pid, const char* dumpType, MINIDUMP
}
if (!dumpWriter.WriteDump())
{
fprintf(stderr, "Writing dump FAILED\n");
goto exit;
}
result = true;
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/debug/createdump/dumpwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ DumpWriter::WriteDump()

// This can happen if the target process dies before createdump is finished
if (read == 0) {
TRACE("ReadProcessMemory(%" PRIA PRIx64 ", %08x) return 0 bytes read\n", address, bytesToRead);
break;
fprintf(stderr, "ReadProcessMemory(%" PRIA PRIx64 ", %08x) returned 0 bytes read\n", address, bytesToRead);
return false;
}

if (!WriteData(m_tempBuffer, read)) {
Expand Down

0 comments on commit c641d97

Please sign in to comment.