Re: [PATCH v2 1/2] Cygwin: cache IsWow64Process2 host arch in wincap.

2024-11-27 Thread Corinna Vinschen
On Nov 26 10:16, Jeremy Drake via Cygwin-patches wrote: > On Tue, 26 Nov 2024, Corinna Vinschen wrote: > > > On Nov 25 11:21, Jeremy Drake via Cygwin-patches wrote: > > > +extern const IMAGE_DOS_HEADER > > > +dosheader __asm__ ("__image_base__"); > > > > On second thought, shouldn't we just use Ge

Re: [PATCH v2 1/2] Cygwin: cache IsWow64Process2 host arch in wincap.

2024-11-26 Thread Jeremy Drake via Cygwin-patches
On Tue, 26 Nov 2024, Corinna Vinschen wrote: > Btw... > > We're doing this because nobody being able to debug ARM64 assembler came > up with a piece of code checking the ntdll assembler code to find the > address of the fast_cwd_pointer on ARM64. > > You seem to have the knowledge and the means to

Re: [PATCH v2 1/2] Cygwin: cache IsWow64Process2 host arch in wincap.

2024-11-26 Thread Jeremy Drake via Cygwin-patches
On Tue, 26 Nov 2024, Corinna Vinschen wrote: > On Nov 25 11:21, Jeremy Drake via Cygwin-patches wrote: > > +extern const IMAGE_DOS_HEADER > > +dosheader __asm__ ("__image_base__"); > > On second thought, shouldn't we just use GetModuleHandle ("cygwin1.dll") > instead of going asm here? I was hopi

Re: [PATCH v2 1/2] Cygwin: cache IsWow64Process2 host arch in wincap.

2024-11-26 Thread Corinna Vinschen
Btw... On Nov 25 11:21, Jeremy Drake via Cygwin-patches wrote: > @@ -4617,14 +4617,12 @@ find_fast_cwd_pointer () > static fcwd_access_t ** > find_fast_cwd () > { > - USHORT emulated, hosted; >fcwd_access_t **f_cwd_ptr; > > - /* First check if we're running in WOW64 on ARM64 emulating AM

Re: [PATCH v2 1/2] Cygwin: cache IsWow64Process2 host arch in wincap.

2024-11-26 Thread Corinna Vinschen
On Nov 25 11:21, Jeremy Drake via Cygwin-patches wrote: > From: Jeremy Drake > > This was already used in the FAST_CWD check, and could be used in a > couple other places. > > I found the "emulated"/process value returned from the function largely > useless, so I did not cache it. It is useless

[PATCH v2 1/2] Cygwin: cache IsWow64Process2 host arch in wincap.

2024-11-25 Thread Jeremy Drake via Cygwin-patches
From: Jeremy Drake This was already used in the FAST_CWD check, and could be used in a couple other places. I found the "emulated"/process value returned from the function largely useless, so I did not cache it. It is useless because, as the docs say, it is set to IMAGE_FILE_MACHINE_UNKNOWN (0)