From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11925 invoked by alias); 14 Jun 2009 14:34:08 -0000 Received: (qmail 11915 invoked by uid 22791); 14 Jun 2009 14:34:07 -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:34:01 +0000 Received: (qmail 31101 invoked from network); 14 Jun 2009 14:32:58 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Jun 2009 14:32:58 -0000 From: Pedro Alves To: danny.backx@scarlet.be Subject: Re: Patch : gdbserver get_image_name on CE Date: Sun, 14 Jun 2009 14:34:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org References: <1244903385.20290.9.camel@pavilion> <1244969225.20290.59.camel@pavilion> <1244972893.20290.71.camel@pavilion> In-Reply-To: <1244972893.20290.71.camel@pavilion> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906141534.24103.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/msg00373.txt.bz2 On Sunday 14 June 2009 10:48:13, Danny Backx wrote: > On Sun, 2009-06-14 at 10:47 +0200, Danny Backx wrote: > > On Sat, 2009-06-13 at 19:05 +0100, Pedro Alves wrote: > > > > 2. Handle a case where the inferior refuses to start. See the > > > > =A0 =A0code after WaitForDebugEvent in win32-low.c . > > >=20 > > > This is quite mystifying. =A0Do you have more details on this? > >=20 > > Not yet, but as I said in the other message, the a simple setjmp demo > > application is an example. Other cases I've seen were with invalid > > requirements to a DLL (use of an API that was not in the DLL). On a > > PocketPC, this causes a dialog to pop up. On Windows Embedded CE the > > application appears just not to start up. Huh, it has nothing to do with GUIs and popups. The fact that this doesn't result in CreateProcess returning ERROR_BAD_EXE_FORMAT is what is quite mystifying. Did you find any reference to this ERROR_PIPE_NOT_CONNECTED case anywhere else? So this supposedly happens when the debug api is reporting the initial list of loaded dlls? Here's a test you could make to make it a bit clearer what is happening: make a simple test app that doesn't reference any non-existing system function. Make a couple of simple dlls, in which one of them calls setjmp or whatever other function non-exiting function. Make the app link to these dlls. Load it under gdbserver. Check if WaitForDebugEvent reports any events, like loading coredll.dll before reporting that ERROR_PIPE_NOT_CONNECTED. I would guess from your description that WaitForDebugEvent would fail when the faulty dll is loaded. BTW, trying the load the faulty dll dynamicaly with LoadLibrary would hopefully fail gracefully, otherwise, you may have found a kernel bug... > >=20 > > > > 3. Setjmp won't work on this platform, I've "#if 0"-ed it out. > > > > =A0 =A0Clearly not the right solution. Comment please. > > >=20 > > > What does "won't work on this platform" mean? =A0If longjmp > > > doesn't work, then you probably have a bug in your > > > headers or import libs? =A0I'd suspect _JBLEN in the > > > mingw headers. > > I've been thinking about that too, I'll try to debug this but that's > > hard with no debugger. You *do* have a debugger. You can debug gdbserver with gdbserver itself. --=20 Pedro Alves