mirror of https://github.com/x64dbg/GleeBug
Emulator: fix offset to VA calculation
This commit is contained in:
parent
0356726f20
commit
7fca84f656
|
|
@ -523,9 +523,12 @@ public:
|
||||||
if (!found->second.pe->IsValidPe())
|
if (!found->second.pe->IsValidPe())
|
||||||
__debugbreak(); //return 0;
|
__debugbreak(); //return 0;
|
||||||
|
|
||||||
|
if (AddressToConvert < FileMapVA)
|
||||||
|
__debugbreak();
|
||||||
|
|
||||||
// convert: FileOffset -> VA
|
// convert: FileOffset -> VA
|
||||||
auto offset = found->second.pe->ConvertOffsetToRva(
|
auto offset = found->second.pe->ConvertOffsetToRva(
|
||||||
uint32( AddressToConvert )
|
uint32( AddressToConvert - FileMapVA )
|
||||||
);
|
);
|
||||||
|
|
||||||
if (offset == INVALID_VALUE)
|
if (offset == INVALID_VALUE)
|
||||||
|
|
|
||||||
|
|
@ -595,9 +595,12 @@ public:
|
||||||
if(!found->second.pe->IsValidPe())
|
if(!found->second.pe->IsValidPe())
|
||||||
__debugbreak(); //return 0;
|
__debugbreak(); //return 0;
|
||||||
|
|
||||||
|
if (AddressToConvert < FileMapVA)
|
||||||
|
__debugbreak();
|
||||||
|
|
||||||
// convert: FileOffset -> VA
|
// convert: FileOffset -> VA
|
||||||
auto offset = found->second.pe->ConvertOffsetToRva(
|
auto offset = found->second.pe->ConvertOffsetToRva(
|
||||||
uint32( AddressToConvert )
|
uint32( AddressToConvert - FileMapVA )
|
||||||
);
|
);
|
||||||
|
|
||||||
if (offset == INVALID_VALUE)
|
if (offset == INVALID_VALUE)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue