From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4153 invoked by alias); 3 Sep 2002 22:06:46 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4145 invoked from network); 3 Sep 2002 22:06:43 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 3 Sep 2002 22:06:43 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 84C9C3C71; Tue, 3 Sep 2002 18:06:44 -0400 (EDT) Message-ID: <3D753274.3020104@ges.redhat.com> Date: Tue, 03 Sep 2002 15:06:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Keith Seitz Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix typos in gdb_compile_pthreads References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00046.txt.bz2 > Hi, > > This simple patch fixes two little typos in gdb_compile_pthreads. One of > them is simply a typo which causes a tcl error when the code is run and > the proc is unable to build a binary. > > The other doesn't cause any errors, but it wastes cpu time doing a string > comparison instead of simple integer comparison. > > Keith > > ChangeLog > 2002-09-03 Keith Seitz > > * lib/gdb.exp (gdb_compile_pthreads): Fix "build_bin" typo. > Use integer comparison instead of string comparison for testing > whether binary was built. Given you know more than most about tcl, I suspect to you these are obvious :-) I'd say, yes, ok. You have <2 hours to commit this :-) Andrew > Patch > Index: testsuite/lib/gdb.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v > retrieving revision 1.24 > diff -p -r1.24 gdb.exp > *** testsuite/lib/gdb.exp 29 Aug 2002 22:36:52 -0000 1.24 > --- testsuite/lib/gdb.exp 3 Sep 2002 18:51:29 -0000 > *************** proc gdb_compile {source dest type optio > *** 1176,1182 **** > # against several different thread libraries, to see which one this > # system has. > proc gdb_compile_pthreads {source dest type options} { > ! set build_binfile 0 > set why_msg "unrecognized error" > foreach lib {-lpthreads -lpthread -lthread} { > # This kind of wipes out whatever libs the caller may have > --- 1176,1182 ---- > # against several different thread libraries, to see which one this > # system has. > proc gdb_compile_pthreads {source dest type options} { > ! set built_binfile 0 > set why_msg "unrecognized error" > foreach lib {-lpthreads -lpthread -lthread} { > # This kind of wipes out whatever libs the caller may have > *************** proc gdb_compile_pthreads {source dest t > *** 1201,1207 **** > } > } > } > ! if {$built_binfile == "0"} { > unsupported "Couldn't compile $source: ${why_msg}" > return -1 > } > --- 1201,1207 ---- > } > } > } > ! if {!$built_binfile} { > unsupported "Couldn't compile $source: ${why_msg}" > return -1 > } > >