Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/shared/debug/dbgutil/elfreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ElfReaderFromFile : public ElfReader
}
}

virtual bool ReadMemory(void* address, void* buffer, size_t size)
virtual bool ReadMemory(const void* address, void* buffer, size_t size)
{
if (m_file == NULL)
{
Expand Down Expand Up @@ -163,7 +163,7 @@ TryGetBuildIdFromFile(const WCHAR* modulePath, BYTE* buffer, ULONG bufferSize, P

#endif // HOST_UNIX

typedef bool (*ReadMemoryCallback)(void* address, void* buffer, size_t size);
typedef bool (*ReadMemoryCallback)(const void* address, void* buffer, size_t size);

class ElfReaderWithCallback : public ElfReader
{
Expand All @@ -181,7 +181,7 @@ class ElfReaderWithCallback : public ElfReader
}

private:
virtual bool ReadMemory(void* address, void* buffer, size_t size)
virtual bool ReadMemory(const void* address, void* buffer, size_t size)
{
return m_readMemory(address, buffer, size);
}
Expand Down Expand Up @@ -225,7 +225,7 @@ class ElfReaderExport : public ElfReader
}

private:
virtual bool ReadMemory(void* address, void* buffer, size_t size)
virtual bool ReadMemory(const void* address, void* buffer, size_t size)
{
uint32_t read = 0;
return SUCCEEDED(m_dataTarget->ReadVirtual(reinterpret_cast<CLRDATA_ADDRESS>(address), reinterpret_cast<PBYTE>(buffer), (uint32_t)size, &read));
Expand Down
2 changes: 1 addition & 1 deletion src/shared/debug/dbgutil/elfreader.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ElfReader
virtual void VisitModule(uint64_t baseAddress, std::string& moduleName) { };
#endif
virtual void VisitProgramHeader(uint64_t loadbias, uint64_t baseAddress, ElfW(Phdr)* phdr) { };
virtual bool ReadMemory(void* address, void* buffer, size_t size) = 0;
virtual bool ReadMemory(const void* address, void* buffer, size_t size) = 0;
virtual void Trace(const char* format, ...) { };
virtual void TraceVerbose(const char* format, ...) { };
};
1 change: 1 addition & 0 deletions src/shared/pal/src/init/pal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ int CacheLineSize;

#ifdef __FreeBSD__
#include <sys/user.h>
#include <sys/sysctl.h>
#endif

#include <algorithm>
Expand Down