From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7718 invoked by alias); 14 Aug 2007 00:43:29 -0000 Received: (qmail 7556 invoked by uid 22791); 14 Aug 2007 00:43:28 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.172) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 14 Aug 2007 00:43:24 +0000 Received: by ug-out-1314.google.com with SMTP id s2so39675uge for ; Mon, 13 Aug 2007 17:43:21 -0700 (PDT) Received: by 10.66.250.9 with SMTP id x9mr215914ugh.1187052201342; Mon, 13 Aug 2007 17:43:21 -0700 (PDT) Received: from ?88.210.75.26? ( [88.210.75.26]) by mx.google.com with ESMTPS id g17sm6740054nfd.2007.08.13.17.43.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 13 Aug 2007 17:43:19 -0700 (PDT) Message-ID: <46C0FA99.1000608@portugalmail.pt> Date: Tue, 14 Aug 2007 00:43:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: Windows DLL support update. References: <46C0F600.5010607@portugalmail.pt> In-Reply-To: <46C0F600.5010607@portugalmail.pt> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2007-08/txt/msg00273.txt.bz2 Pedro Alves wrote: > Hi all, > > Here is the new version of the patch that converts native win32 > debugging to use the new solib-target.c. The biggest difference > compared to the latest version Daniel posted is that this > version maintains the list of loaded dlls separately from > solib-target.c, similarly to what is done in current cvs. The > previous versions always queried the target for the dll list > and maintained no private list. At the time it sounded like a > good idea, since, well, if Windows already maintains the list, we > might as well just read it. It turns out that this wasn't perfect > because it still required us to keep at least the last loaded dll > (last_loaded_dll_valid mechanism in the previous version), > because when a dll (un)load event occurs, the loader hasn't > completely finished the load, and the dll isn't reported on > the lists. This version is now similar to what current > gdbserver is doing. > > I've kept this version of the patch to a minimum, by removing the > fixes of formatting violations, typos and dead code removals > from the patch. > > The patch could be easily be split further. Probably the writebuf > fix in corelow.c and the infcmd.c hunks could go in on their own. > The xml and objstack changes could also go in separately, but > they don't have any other users yet. Daniel, you've written > most of the changes outside of win32-nat.c, I'll leave that decision > to you. If you want me to do that, just say so. > > I've ran the testsuite on Windows XP several times against an > unpatched current cvs, against a gdb patched with the > previous patch, and with this patch. I've carefully compared > the results (1), of all the runs and didn't see any regression. > I did see one consistent improvement in unload.exp > > -FAIL: gdb.base/unload.exp: continuing to end of program > -FAIL: gdb.base/unload.exp: rerun to shared library breakpoint > -FAIL: gdb.base/unload.exp: continuing to end of program second time (the > program is no longer running) > +PASS: gdb.base/unload.exp: continuing to end of program > +PASS: gdb.base/unload.exp: rerun to shared library breakpoint > +PASS: gdb.base/unload.exp: continuing to end of program second time > > I didn't really took the time to see why these tests > failed before. > > (1) Test results aren't stable. I always have to repeat a few, > because they usually fail UNTESTED due to several reasons, like > the compile step failing because the output binfile is still > loaded by the previous test (Windows only), or, eg: > (...) > -PASS: gdb.cp/maint.exp: maint cp first_component foo< > -PASS: gdb.cp/maint.exp: maint cp first_component foo( > -PASS: gdb.cp/maint.exp: maint cp first_component bool operator< > -PASS: gdb.cp/maint.exp: maint cp namespace > +ERROR: Process no longer exists > +UNRESOLVED: gdb.cp/maint.exp: maint cp first_component operator -> > +ERROR: Couldn't send maint cp first_component foo() to GDB. > +UNRESOLVED: gdb.cp/maint.exp: maint cp first_component foo() > +ERROR: Couldn't send maint cp first_component foo(int) to GDB. > +UNRESOLVED: gdb.cp/maint.exp: maint cp first_component foo(int) > (...) > > This should also fix the problem Joel reported at: > [win32] wrong solib from/to addresses > http://sourceware.org/ml/gdb-patches/2007-06/msg00210.html > > ... but I have no Vista to test on. > And I forgot to say the reason I did this now. This is one way to enable a Cygwin hosted gdb to take advantage of the new gdbserver dll support. Currently win32-nat.c has one of those beauties: /* FIXME: Don't do this here. *_gdbarch_init() should set so_ops. */ current_target_so_ops = &win32_so_ops; ... target remote then always uses win32_so_ops, which, of course, is broken ... If this patch is too late for 6.7, I'd like to at least have that fixed. Cheers, Pedro Alves > > P.S. > > The testresults (c, c++) look somewhat (1 above) like this with gcc+gdb > patches > to overcome the '__main emitted in main breaks run_to_main' problem. > > # of expected passes 9441 > # of unexpected failures 177 > # of unexpected successes 1 > # of expected failures 47 > # of known failures 30 > # of unresolved testcases 21 > # of untested testcases 16 > # of unsupported tests 32 > >