Skip to content

Commit

Permalink
Fix the MacOS remote unwinder for VS4Mac (#63378)
Browse files Browse the repository at this point in the history
The wrong module was being passed to the remote unwinder because the load bias for shared modules
was being calculated incorrectly.
  • Loading branch information
mikem8361 authored Jan 5, 2022
1 parent bd6a64b commit 311ecfe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/coreclr/debug/dbgutil/machoreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,8 @@ MachOModule::ReadLoadCommands()
m_segments.push_back(segment);

// Calculate the load bias for the module. This is the value to add to the vmaddr of a
// segment to get the actual address. For shared modules, this is 0 since those segments
// are absolute address.
if (segment->fileoff == 0 && segment->filesize > 0)
// segment to get the actual address.
if (strcmp(segment->segname, SEG_TEXT) == 0)
{
m_loadBias = m_baseAddress - segment->vmaddr;
}
Expand Down

0 comments on commit 311ecfe

Please sign in to comment.