From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1119 invoked by alias); 2 Oct 2008 11:58:09 -0000 Received: (qmail 1104 invoked by uid 22791); 2 Oct 2008 11:58:08 -0000 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 02 Oct 2008 11:57:29 +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 m92Brog8030368 ; Thu, 2 Oct 2008 13:53:50 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402::141]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id m92BroWn038727 ; Thu, 2 Oct 2008 13:53:50 +0200 (CEST) Received: from d620muller (www-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id m92Brh6f098279 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Thu, 2 Oct 2008 13:53:49 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Pedro Alves'" , References: <005401c923c0$be5ae250$3b10a6f0$@u-strasbg.fr> <200810011909.10343.pedro@codesourcery.com> <009a01c9246a$64ece5b0$2ec6b110$@u-strasbg.fr> In-Reply-To: <009a01c9246a$64ece5b0$2ec6b110$@u-strasbg.fr> Subject: [RFA] fix win32-nat failure Date: Thu, 02 Oct 2008 11:58:00 -0000 Message-ID: <00b701c92485$8bc23260$a3469720$@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::157]); Thu, 02 Oct 2008 13:53:51 +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-10/txt/msg00049.txt.bz2 I ran a testsuite on cygwin with the patch below, I got this results: === gdb Summary === # of expected passes 11190 # of unexpected failures 469 # of expected failures 58 # of unknown successes 2 # of known failures 110 # of unresolved testcases 40 # of untested testcases 15 # of unsupported tests 23 /usr/local/src/gdbcvs/build-bare/gdb/testsuite/../../gdb/gdb version 6.8.50.200 81002-cvs -nx make: *** [check] Error 1 This seems like a "normal" outcome for cygwin native gdb. Thus I would like to get approval for the following patch, Pierre Muller Pascal language support maintainer for GDB ChangeLog entry: 2008-10-02 Pierre Muller Pedro Alves * win32-nat.c (do_initial_win32_stuff): Set inferior_ptid. Index: gdb/win32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/win32-nat.c,v retrieving revision 1.164 diff -u -p -r1.164 win32-nat.c --- gdb/win32-nat.c 22 Sep 2008 15:21:30 -0000 1.164 +++ gdb/win32-nat.c 2 Oct 2008 08:59:25 -0000 @@ -1550,6 +1550,12 @@ do_initial_win32_stuff (DWORD pid, int a inf = add_inferior (pid); inf->attach_flag = attaching; + /* Make the new process the current inferior, so terminal handling + can rely on it. When attaching, we don't know about any thread + id here, but that's OK --- nothing should be referencing the + current thread until we report an event out of win32_wait. */ + inferior_ptid = pid_to_ptid (pid); + terminal_init_inferior_with_pgrp (pid); target_terminal_inferior ();