This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch : gdbserver get_image_name on CE


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
> > > > ? ?code after WaitForDebugEvent in win32-low.c .
> > > 
> > > This is quite mystifying. ?Do you have more details on this?
> > 
> > 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...

> > 
> > > > 3. Setjmp won't work on this platform, I've "#if 0"-ed it out.
> > > > ? ?Clearly not the right solution. Comment please.
> > > 
> > > What does "won't work on this platform" mean? ?If longjmp
> > > doesn't work, then you probably have a bug in your
> > > headers or import libs? ?I'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.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]