public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: Cygwin Patches <cygwin-patches@cygwin.com>
Subject: Re: [PATCH 5/5] Cygwin: Use MEMORY_WORKING_SET_EX_INFORMATION in dumper
Date: Tue, 28 Jul 2020 22:04:17 +0100	[thread overview]
Message-ID: <1e95ce4f-da33-bf26-6727-a89641ff374a@dronecode.org.uk> (raw)
In-Reply-To: <20200728112056.86427f1c9e2a3e044dfa169e@nifty.ne.jp>

On 28/07/2020 03:20, Takashi Yano via Cygwin-patches wrote:
> Hi Jon,
> 
> On Sat, 18 Jul 2020 16:00:28 +0100
> Jon Turney wrote:
>> Use the (undocumented) MEMORY_WORKING_SET_EX_INFORMATION in dumper to
>> determine if a MEM_IMAGE region is unsharable, and hence has been
>> modified.
>> ---
>>   winsup/doc/utils.xml     |  8 ++---
>>   winsup/utils/Makefile.in |  2 +-
>>   winsup/utils/dumper.cc   | 63 ++++++++++++++++++++++++++++++++++++++--
>>   3 files changed, 65 insertions(+), 8 deletions(-)
> 
> After this commit, 32bit build failes with:
> 
> /usr/lib/gcc/i686-pc-cygwin/9.3.0/../../../../i686-pc-cygwin/bin/ld: dumper.o:/home/yano/newlib-cygwin/i686-pc-cygwin/winsup/utils/../../.././winsup/utils/dumper.cc:295: undefined reference to `NtQueryVirtualMemory'

Thanks very much for pointing this out.

> This seems to be solved with the patch:

Yes, I guess that it needs that for stdcall.  I applied your patch.

> diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
> index 3af138b9e..36dbf9dbb 100644
> --- a/winsup/utils/dumper.cc
> +++ b/winsup/utils/dumper.cc
> @@ -272,7 +272,7 @@ typedef enum _MEMORY_INFORMATION_CLASS
>   } MEMORY_INFORMATION_CLASS;
> 
>   extern "C"
> -NTSTATUS
> +NTSTATUS NTAPI
>   NtQueryVirtualMemory(HANDLE ProcessHandle,
>                       LPVOID BaseAddress,
>                       MEMORY_INFORMATION_CLASS MemoryInformationClass,
> 

      reply	other threads:[~2020-07-28 21:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 15:00 [PATCH 0/5] Improve dumper megion region selection Jon Turney
2020-07-18 15:00 ` [PATCH 1/5] Cygwin: Show details of all memory regions details in dumper debug output Jon Turney
2020-07-18 15:00 ` [PATCH 2/5] Cygwin: Remove reading of PE for section flags from dumper Jon Turney
2020-07-18 15:00 ` [PATCH 3/5] Cygwin: Drop excluded regions list " Jon Turney
2020-07-18 15:00 ` [PATCH 4/5] Cygwin: Don't dump non-writable image regions Jon Turney
2020-07-18 15:00 ` [PATCH 5/5] Cygwin: Use MEMORY_WORKING_SET_EX_INFORMATION in dumper Jon Turney
2020-07-20  8:15   ` Corinna Vinschen
2020-07-28  2:20   ` Takashi Yano
2020-07-28 21:04     ` Jon Turney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e95ce4f-da33-bf26-6727-a89641ff374a@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).