From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1448 invoked by alias); 14 Jun 2009 14:05:04 -0000 Received: (qmail 1439 invoked by uid 22791); 14 Jun 2009 14:05:03 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 14 Jun 2009 14:04:58 +0000 Received: (qmail 16786 invoked from network); 14 Jun 2009 14:03:22 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Jun 2009 14:03:21 -0000 From: Pedro Alves To: danny.backx@scarlet.be Subject: Re: Patch : gdbserver get_image_name on CE Date: Sun, 14 Jun 2009 14:05:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org References: <1244903385.20290.9.camel@pavilion> <200906131905.30933.pedro@codesourcery.com> <1244969225.20290.59.camel@pavilion> In-Reply-To: <1244969225.20290.59.camel@pavilion> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906141504.53294.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00371.txt.bz2 On Sunday 14 June 2009 09:47:05, Danny Backx wrote: > > IIRC, psapi.dll does exist on WinCE, but it is > > not bundled with the OS usually. =A0If I'm not confusing > > it with some other dll, I think I have it for ARM, gotten > > from some MSFT redistributable, and it does work. >=20 > It isn't on the Windows Embedded for x86 that I'm using. But the > gdbserver code appears to be well written : it silently falls back to > something that does work. >=20 > I've not messed with that code because "if it ain't broke, don't fix > it". I could have surrounded it with #ifndef _WIN32_WCE but I didn't see > the point. I've no idea what you're talking about here, or even why we talking about psapi.dll anyway. The only hunks in your patches touching psapi related things are: - if (!load_psapi ()) + if (!load_psapi ()) { goto failed; + } and... + /* Note : no psapi.dll on CE, fall back to get_image_name below. */ if (!psapi_get_dll_name ((DWORD) event->lpBaseOfDll, dll_buf)) The fact that psapi is dynamicaly loaded with LoadLibrary was exactly so that gdbserver falls back to other mechanisms. Even on desktop Windows it isn't garanteed that psapi.dll will be around. Please drop these spurious hunks from the patch. BTW,=20 - if (!load_psapi ()) + if (!load_psapi ()) { goto failed; + } The coding conventions states to not surround a single statement with curly braces, so that original version would be the correct form --- your patch would make it wrong. + /* Note : no psapi.dll on CE, fall back to get_image_name below. */ Double spaces after period, no space before ':'. This would be: /* Note: no psapi.dll on CE, fall back to get_image_name below. */ But as I said, this hunk is unnecessary. --=20 Pedro Alves