Cygwin: Make dumper scan more than first 4GB of VM on x86_64

It's unclear that we need an end address here at all, or can just rely
on VirtualQueryEx() failing when we reach the end of memory regions.
This commit is contained in:
Jon Turney 2020-07-01 14:00:53 +01:00
parent 7dd1b08836
commit 2a0e84c8db
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
1 changed files with 2 additions and 2 deletions

View File

@ -296,7 +296,7 @@ dumper::collect_memory_sections ()
return 0;
LPBYTE current_page_address;
LPBYTE last_base = (LPBYTE) 0xFFFFFFFF;
LPBYTE last_base = (LPBYTE) -1;
SIZE_T last_size = (SIZE_T) 0;
SIZE_T done;
@ -307,7 +307,7 @@ dumper::collect_memory_sections ()
if (hProcess == NULL)
return 0;
for (current_page_address = 0; current_page_address < (LPBYTE) 0xFFFF0000;)
for (current_page_address = 0; current_page_address < (LPBYTE) -1;)
{
if (!VirtualQueryEx (hProcess, current_page_address, &mbi, sizeof (mbi)))
break;