From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17693 invoked by alias); 1 May 2009 08:18:21 -0000 Received: (qmail 17683 invoked by uid 22791); 1 May 2009 08:18:20 -0000 X-SWARE-Spam-Status: No, hits=0.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_JMF_BL,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout6.012.net.il (HELO mtaout6.012.net.il) (84.95.2.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 May 2009 08:18:16 +0000 Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KIY00800HKI5D00@i-mtaout6.012.net.il> for gdb-patches@sourceware.org; Fri, 01 May 2009 11:17:05 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.230.216]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KIY00L7JHOHS8G0@i-mtaout6.012.net.il> for gdb-patches@sourceware.org; Fri, 01 May 2009 11:17:05 +0300 (IDT) Date: Fri, 01 May 2009 08:18:00 -0000 From: Eli Zaretskii Subject: [djgpp/commit] Fix go32_pid_to_str and go32_thread_alive To: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <834ow5dypg.fsf@gnu.org> 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-05/txt/msg00007.txt.bz2 The patch below fixes what GDB prints to identify the inferior process, and also avoids thinking that null_ptid is a live thread. Committed. 2009-05-01 Eli Zaretskii * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of printing a bogus "Thread
". (go32_thread_alive): Don't return 1 for null_ptid. Index: gdb/go32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/go32-nat.c,v retrieving revision 1.71 diff -u -r1.71 go32-nat.c --- gdb/go32-nat.c 19 Apr 2009 18:29:33 -0000 1.71 +++ gdb/go32-nat.c 1 May 2009 08:12:36 -0000 @@ -870,15 +870,13 @@ static int go32_thread_alive (struct target_ops *ops, ptid_t ptid) { - return 1; + return !ptid_equal (inferior_ptid, null_ptid); } static char * go32_pid_to_str (struct target_ops *ops, ptid_t ptid) { - static char buf[64]; - xsnprintf (buf, sizeof buf, "Thread
"); - return buf; + return normal_pid_to_str (ptid); } static void