From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic307-54.consmr.mail.ir2.yahoo.com (sonic307-54.consmr.mail.ir2.yahoo.com [87.248.110.31]) by sourceware.org (Postfix) with ESMTPS id ECAA53951C65 for ; Thu, 26 Mar 2020 21:01:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ECAA53951C65 X-YMail-OSG: eFEHL7QVM1lbYsBibRG_sxW_hJQL6TaQ6MMWzYHR4.q90jzqeZPUPK.TnampzSX DLkPjUqQ9qpv_exJGNxFI66r4yBFu9ZDn32iQbDP1kvL1Me8YGapag7Uv1gIhzf7D3hIimtFAfAF VjQh37npjITUEWaA2qLjENXXhPwSJjytvRO3hpn7rsmJIkbbrMg._KM9jMeACut_hkt_A_eF2SEg LfksZx2KFBXE63sHedc2EDJ7u.6IOocU9FKVPup6Cjhhrv6w_xDPiVDoDp01tbJXAXxVtPS9lxy1 lUg33PnAJ0eeUHB4OeTF9YwVroh8WfxrrLIkWY6ezyjgfSVAK643WQFjI5_2nOZetozGdcT_n0Oz Fxz.7QNWjJdVVLcDsa8k2wbZroLckQn23IPrV3wJuU54ElBRzlaBIuG2HjzDAuVktRyo_uhIJNDr qYUY2fpcettKnwqOedIbaR1r5RGhYD1JNWr7rZro9LVcs64oSE8YnRMpGbwAqHp9eKCeo1dHkMP7 w07LlGj658itFNo.ohGZb2CL33oYzVHWRUEpeFXYPG4f12TDZcTIn6Viak3qYEWFYI2Xp2mqSIsl I9S.UVeT.Tj9HQXYKQP4ON_LFjV6BxnSHJqjDN5l.M.rHDfaRolgADtTj9XqHjRPeOiyKh__zSaw YIvDZutwdhs2LfEbm3jQofdcuXuAlTsaLbPAeBxgDcO0qaPYzyeVdNOujDINIVjxKYFrXKwLTYMp 4LfaXAQgTuHdbRTQI8e8xBtZgDZAq75LUC_xahBe_sdHOBRUSsci_LTnK5Uy2d00tS1RaOYfm98k dwYVsSXe7c8AQLL6K5oQiYaJ8_qPVOIg.JRl8gn4MTlVhcH59kjDj2CBPqatf.tjp4yBVHySFTiO 6Tpg7EOgwPBHSCM3uCHWoE6wNcA8ubOYZTNF1dra.aZ3mHOmbrWxtya.uh.4j5mKJVyynBPfUjg5 dmCTddLP1rPHzKry4H1Vl806VTTtbDq5r0EAPlawPXubPPX8BG2VIS9J36ShNWNguiROOx_BOQvZ SgrPaVAtgv7AR101.yp.67msjZ1hh1R9tE3AUl0etf3qwdYDbEhdKEl1i4ttYht3LL2MHBLxAm59 eZ79Qo2eJESNl_AdgNHk1spMLV7V_Ylq_zClcYu1TghVE.iAe2esGxJgRabegCAzpWEbxRARGODN g4MnqqPDHWqtgyAQQrt7PVsvMAtXfGD9BSnIs1mQvb8Vh_TTtM2ScEDVNcCtVIyB_bl9ecU2nZS2 GHIY0XZJeyjYgr8TeDoKMJP_Vydp8RDHuUqDi0mLPGLMLMJJhkllHFJkAELvSTHOHn6rANAUH0AI OkAj3zAajzwdvNUjEAyP59O_.8lbJZqkCKeQOMOLhKwOpF2Z0xIUB03XCpsBm30w1cHQgobET8JW 971nhyWDRwnX8V3.jPSOdBRQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ir2.yahoo.com with HTTP; Thu, 26 Mar 2020 21:01:41 +0000 Date: Thu, 26 Mar 2020 21:01:40 +0000 (UTC) From: Hannes Domani To: Gdb-patches Message-ID: <284558264.5419040.1585256500672@mail.yahoo.com> In-Reply-To: <532d1a18-76d1-2bda-c252-7dd001e6a8d1@simark.ca> References: <20200324192351.3904-1-ssbssa.ref@yahoo.de> <20200324192351.3904-1-ssbssa@yahoo.de> <6fcfc7b1-5b1d-1bca-5bd8-06b075d626e6@simark.ca> <840438313.3764470.1585146130281@mail.yahoo.com> <1d7bb2df-1f3e-9ff7-ea38-05db350192d2@simark.ca> <30076034.3775038.1585146951973@mail.yahoo.com> <831rpf9bol.fsf@gnu.org> <692595410.5392254.1585254931564@mail.yahoo.com> <1525100081.5445433.1585255715401@mail.yahoo.com> <532d1a18-76d1-2bda-c252-7dd001e6a8d1@simark.ca> Subject: Re: [PATCH v2] Fix WOW64 process system DLL paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.15518 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 21:01:44 -0000 Am Donnerstag, 26. M=C3=A4rz 2020, 21:57:00 MEZ hat Simon Marchi Folgendes geschrieben: > On 2020-03-26 4:48 p.m., Hannes Domani via Gdb-patches wrote: > > >=C2=A0 Am Donnerstag, 26. M=C3=A4rz 2020, 21:39:27 MEZ hat Christian Bie= singer Folgendes geschrieben: > > > >> On Thu, Mar 26, 2020 at 3:35 PM Hannes Domani via Gdb-patches > >> > >> wrote: > >>> > >>>=C2=A0=C2=A0 Am Donnerstag, 26. M=C3=A4rz 2020, 20:26:14 MEZ hat Eli Z= aretskii Folgendes geschrieben: > >>> > >>>>> Date: Wed, 25 Mar 2020 14:35:51 +0000 (UTC) > >>>> > >>>>> From: Hannes Domani via Gdb-patches > >>>>> > >>>>>>> But I figured my way with GetSystemWow64Directory is simpler. > >>>>>>> > >>>>>>> > >>>>>>> Is the v2 OK to commit? > >>>>>> > >>>>>> Yes, thanks. > >>>>> > >>>>> Pushed, thanks. > >>>> > >>>> > >>>> It looks like the same problem exists in the 32-bit Windows build of > >>>> GDB, when it runs on 64-bit Windows 10: "info sharedlibrary" shows > >>>> C:\Windows\system32 instead of C:\Windows\SysWOW64 (it doesn't happe= n > >>>> on 64-bit Windows 7, for example).=C2=A0 So I guess the code which r= eplaces > >>>> the former with the latter should also be in the 32-bit build, not > >>>> just "#ifdef __x86_64__". > >>> > >>> Yes, for me (on Win7) it also happens with the same dlls in the 32-bi= t gdb > >>> as with the 64-bit gdb. > >>> But it shouldn't matter, since for 32-bit gdb all C:\Windows\system32= paths > >>> are automatically redirected[1] to C:\Windows\SysWOW64 anyways. > >>> > >>> [1] https://docs.microsoft.com/en-us/windows/win32/winprog64/file-sys= tem-redirector > >> > >> > >> Even so, it's probably less confusing for the user if what GDB > >> displays actually matches reality? > > > > I guess you are right. > > I will prepare a patch for this. > > > Let's say a 32 bit GDB is debugging a 64 bit program.=C2=A0 GDB gets the = list of loaded libraries, which > contains c:\windows\system32\foo.dll.=C2=A0 When GDB opens it, to read th= e contents of the library, will > it open and read c:\windows\system32\foo.dll (which is the one really loa= ded in the 64-bit process) > or will it open and read c:\windows\syswow64\foo.dll? You can't debug a 64-bit program with a 32-bit gdb, it's only possible the other way around. But if it were possible, it would read c:\windows\syswow64\foo.dll.