public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH 5/5] Cygwin: Use MEMORY_WORKING_SET_EX_INFORMATION in dumper
Date: Tue, 28 Jul 2020 11:20:56 +0900	[thread overview]
Message-ID: <20200728112056.86427f1c9e2a3e044dfa169e@nifty.ne.jp> (raw)
In-Reply-To: <20200718150028.1709-6-jon.turney@dronecode.org.uk>

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'

This seems to be solved with the 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,

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  parent reply	other threads:[~2020-07-28  2:20 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 [this message]
2020-07-28 21:04     ` Jon Turney

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=20200728112056.86427f1c9e2a3e044dfa169e@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --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).