From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16987 invoked by alias); 6 Jun 2005 13:46:08 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 16715 invoked by uid 22791); 6 Jun 2005 13:45:41 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 06 Jun 2005 13:45:41 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DfHXK-0006re-Ks; Mon, 06 Jun 2005 09:21:02 -0400 Date: Mon, 06 Jun 2005 13:46:00 -0000 From: Daniel Jacobowitz To: Atsushi Nemoto Cc: gdb@sources.redhat.com Subject: Re: Thread ID in gdbserver Message-ID: <20050606132101.GA26360@nevyn.them.org> Mail-Followup-To: Atsushi Nemoto , gdb@sources.redhat.com References: <20050606.142517.51862870.nemoto@toshiba-tops.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050606.142517.51862870.nemoto@toshiba-tops.co.jp> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-06/txt/msg00041.txt.bz2 On Mon, Jun 06, 2005 at 02:25:17PM +0900, Atsushi Nemoto wrote: > Hi. In Mar 2005, the type of cont_thread, stop_thread, etc. was > changed to "unsigned long" from "int". But there are still some codes > which assume these variables are signed numbers. > > For example, in gdbserver/server.c: > > unsigned long cont_thread; > ... > if (n == 1 && resume_info[0].thread != -1) > cont_thread = resume_info[0].thread; > else > cont_thread = -1; > ... > if (step || sig || cont_thread > 0) > > This looks very suspicious. > > For now I do not know whether this is real problem, but it is > potential bug and should be fixed, isn't it? Absolutely. I have a bunch of saved mail in my todo list reminding me to fix these, but I haven't yet. With a modern GDB using vCont, most of these bugs are not encountered; I didn't do a detailed analysis of the others to see if they'd cause problems, it would be easier to fix them. -- Daniel Jacobowitz CodeSourcery, LLC