From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13006 invoked by alias); 19 Jun 2008 00:02:12 -0000 Received: (qmail 12994 invoked by uid 22791); 19 Jun 2008 00:02:10 -0000 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 19 Jun 2008 00:01:47 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id m5J01hID058729 for ; Thu, 19 Jun 2008 02:01:43 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402::142]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id m5J01h6r034095 for ; Thu, 19 Jun 2008 02:01:43 +0200 (CEST) Received: from d620muller ([130.79.244.145]) by mailserver.u-strasbg.fr (8.13.8/jtpda-5.5pre1) with ESMTP id m5J01eh6099548 for ; Thu, 19 Jun 2008 02:01:43 +0200 (CEST) From: "Pierre Muller" To: Subject: [RFC] win32-nat.c: fix "info threads" test failures Date: Thu, 19 Jun 2008 03:54:00 -0000 Message-ID: <000001c8d19f$a7c3a040$f74ae0c0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (mailhost.u-strasbg.fr [IPv6:2001:660:2402::156]); Thu, 19 Jun 2008 02:01:43 +0200 (CEST) X-Virus-Status: Clean 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: 2008-06/txt/msg00342.txt.bz2 This one line patch fixes an issue of testsuite failures due to an assumption in several tests that "info threads" should return "Thread " while it does return "thread " currently for cygwin/mingw32. The reason why this is a RFC rather than a RFA is that when I tried to find out where the difference was coming from, I realized that the process and thread strings used by gdb where not very uniform and win32-nat.c does not seem to be the only place where "thread" is used... The proc_string function in gnu-nat.c at line 2559 seems to also use "thread" for the same purpose. Of course, another option would be to leave the sources unchanged and to only change the testsuite by changing all "Thread" into "\[Tt\]hread", in the tests using "info threads". Anyhow, as Christopher told recently that he wanted to reduce the number of differences between the mingw32/cygwin gdb port and others, I finally decided to send the win32-nat.c change as a RFC. Pierre Muller Pascal language support maintainer for GDB ChangeLog entry: 2008-12-18 Pierre Muller * win32-nat.c (win32_pid_to_str): Use capital T for "Thread". Pierre@d620-muller ~/gdbcvs/purecvs $ cat win32thread.patch Index: gdb/win32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/win32-nat.c,v retrieving revision 1.152 diff -u -p -r1.152 win32-nat.c --- gdb/win32-nat.c 20 May 2008 18:36:36 -0000 1.152 +++ gdb/win32-nat.c 17 Jun 2008 08:11:26 -0000 @@ -2006,7 +2006,7 @@ win32_pid_to_str (ptid_t ptid) if ((DWORD) pid == current_event.dwProcessId) sprintf (buf, "process %d", pid); else - sprintf (buf, "thread %ld.0x%x", current_event.dwProcessId, pid); + sprintf (buf, "Thread %ld.0x%x", current_event.dwProcessId, pid); return buf; } Differences between testsuite without/with that patch. --- gdb-cvs.sum 2008-06-19 00:26:27.968750000 +0200 +++ gdb-win32thread.sum 2008-06-19 01:42:19.421875000 +0200 @@ -1,4 +1,4 @@ -Test Run By Pierre on Wed Jun 18 23:12:11 2008 +Test Run By Pierre on Thu Jun 19 00:27:04 2008 Native configuration is i686-pc-cygwin === gdb tests === @@ -6294,7 +6294,7 @@ FAIL: gdb.base/signull.exp: code; backtrace from keeper through SIGSEGV Running ../../../purecvs/gdb/testsuite/gdb.base/sigrepeat.exp ... PASS: gdb.base/sigrepeat.exp: advance to infinite loop -FAIL: gdb.base/sigrepeat.exp: next (timeout) +FAIL: gdb.base/sigrepeat.exp: next Running ../../../purecvs/gdb/testsuite/gdb.base/sigstep.exp ... PASS: gdb.base/sigstep.exp: display/i $pc PASS: gdb.base/sigstep.exp: break handler @@ -11848,7 +11848,7 @@ PASS: gdb.threads/execl.exp: successfully compiled posix threads test case PASS: gdb.threads/execl.exp: set breakpoint at execl PASS: gdb.threads/execl.exp: continue to exec -FAIL: gdb.threads/execl.exp: info threads before exec +PASS: gdb.threads/execl.exp: info threads before exec FAIL: gdb.threads/execl.exp: continue across exec PASS: gdb.threads/execl.exp: info threads after exec PASS: gdb.threads/execl.exp: info threads after exec @@ -11908,7 +11908,37 @@ PASS: gdb.threads/pthreads.exp: set print sevenbit-strings PASS: gdb.threads/pthreads.exp: set width 0 PASS: gdb.threads/pthreads.exp: shell stty intr '^C' -UNSUPPORTED: gdb.threads/pthreads.exp: gdb does not support pthreads for this m achine +PASS: gdb.threads/pthreads.exp: info threads +PASS: gdb.threads/pthreads.exp: break thread1 +FAIL: gdb.threads/pthreads.exp: Continue to creation of first thread (the progr am exited) +PASS: gdb.threads/pthreads.exp: disable +FAIL: gdb.threads/pthreads.exp: break thread2 +FAIL: gdb.threads/pthreads.exp: Continue to creation of second thread (the prog ram is no longer running) +PASS: gdb.threads/pthreads.exp: set var common_routine::hits=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread1=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread2=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::from_main=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::full_coverage=0 +PASS: gdb.threads/pthreads.exp: disable +PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15 +FAIL: gdb.threads/pthreads.exp: continue until common routine run 15 times +FAIL: gdb.threads/pthreads.exp: Continue with all threads running (timeout) +PASS: gdb.threads/pthreads.exp: Stopped with a ^C +PASS: gdb.threads/pthreads.exp: bt +PASS: gdb.threads/pthreads.exp: set var common_routine::hits=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread1=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread2=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::from_main=0 +PASS: gdb.threads/pthreads.exp: set var common_routine::full_coverage=0 +PASS: gdb.threads/pthreads.exp: disable +PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15 +FAIL: gdb.threads/pthreads.exp: continue until common routine run 15 times +FAIL: gdb.threads/pthreads.exp: check backtrace from main thread (the program i s no longer running) +FAIL: gdb.threads/pthreads.exp: check backtrace from thread 1 +FAIL: gdb.threads/pthreads.exp: check backtrace from thread 2 +FAIL: gdb.threads/pthreads.exp: apply backtrace command to all three threads +PASS: gdb.threads/pthreads.exp: set break at common_routine in thread 2 +FAIL: gdb.threads/pthreads.exp: continue to bkpt at common_routine in thread 2 Running ../../../purecvs/gdb/testsuite/gdb.threads/schedlock.exp ... PASS: gdb.threads/schedlock.exp: successfully compiled posix threads test case PASS: gdb.threads/schedlock.exp: shell stty intr '^C' @@ -11930,7 +11960,9 @@ PASS: gdb.threads/thread-specific.exp: set print sevenbit-strings PASS: gdb.threads/thread-specific.exp: set width 0 PASS: gdb.threads/thread-specific.exp: continue to breakpoint: all threads star ted -FAIL: gdb.threads/thread-specific.exp: get threads list (no threads) +PASS: gdb.threads/thread-specific.exp: get threads list +PASS: gdb.threads/thread-specific.exp: breakpoint 59 main thread +PASS: gdb.threads/thread-specific.exp: continue to thread-specific breakpoint Running ../../../purecvs/gdb/testsuite/gdb.threads/thread_check.exp ... PASS: gdb.threads/thread_check.exp: successfully compiled posix threads test ca se PASS: gdb.threads/thread_check.exp: breakpoint at tf @@ -12125,13 +12157,13 @@ === gdb Summary === -# of expected passes 10970 -# of unexpected failures 389 +# of expected passes 10994 +# of unexpected failures 398 # of expected failures 59 # of unknown successes 2 # of known failures 23 # of unresolved testcases 40 # of untested testcases 14 -# of unsupported tests 23 +# of unsupported tests 22 /usr/local/src/gdbcvs/build-bare/gdb/testsuite/../../gdb/gdb version 6.8.50.20 080618-cvs -nx