From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14111 invoked by alias); 1 May 2009 10:19:04 -0000 Received: (qmail 14100 invoked by uid 22791); 1 May 2009 10:19:03 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 May 2009 10:18:56 +0000 Received: (qmail 26530 invoked from network); 1 May 2009 10:18:54 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 May 2009 10:18:54 -0000 From: Pedro Alves To: gdb-patches@sourceware.org, Eli Zaretskii Subject: Re: [djgpp/commit] Fix go32_pid_to_str and go32_thread_alive Date: Fri, 01 May 2009 10:19:00 -0000 User-Agent: KMail/1.9.10 References: <834ow5dypg.fsf@gnu.org> In-Reply-To: <834ow5dypg.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905011118.51917.pedro@codesourcery.com> 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/msg00013.txt.bz2 On Friday 01 May 2009 09:17:15, Eli Zaretskii wrote: > 2009-05-01 Eli Zaretskii > > * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of > printing a bogus "Thread
". I thought that the inferior's PID on DJGPP is always the fake SOMEPID (42), an internal implementation detail, that we'd never want to show to the user, but, normal_pid_to_str will print "process 42" here. Isn't that bogus as well? > (go32_thread_alive): Don't return 1 for null_ptid. Interesting. This may be masking some other problem. How did you get here with inferior_ptid == null_ptid? AFAICS, when the inferior exits or is killed, the go32_ops target is unpushed. > > 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 > -- Pedro Alves