From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 522 invoked by alias); 27 Aug 2004 15:28:35 -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 505 invoked from network); 27 Aug 2004 15:28:33 -0000 Received: from unknown (HELO e34.co.us.ibm.com) (32.97.110.132) by sourceware.org with SMTP; 27 Aug 2004 15:28:33 -0000 Received: from westrelay05.boulder.ibm.com (westrelay05.boulder.ibm.com [9.17.193.33]) by e34.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7RFSWdn241712; Fri, 27 Aug 2004 11:28:32 -0400 Received: from austin.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by westrelay05.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7RFSVgU116946; Fri, 27 Aug 2004 09:28:32 -0600 Received: from lazy.austin.ibm.com (lazy.austin.ibm.com [9.53.94.97]) by austin.ibm.com (8.12.10/8.12.10) with ESMTP id i7RFSURn036676; Fri, 27 Aug 2004 10:28:30 -0500 Date: Fri, 27 Aug 2004 15:28:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: Michael Chastain cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] GDB testsuite patch. (revised version) In-Reply-To: <412F49BA.nailEDT11A0NY@mindspring.com> Message-ID: References: <41251A45.nail58D215HD7@mindspring.com> <4125BB8B.nailJWP1FZGHJ@mindspring.com> <20040825124945.GA25217@nevyn.them.org> <412C98BD.nail10P1YTPHK@mindspring.com> <412F49BA.nailEDT11A0NY@mindspring.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-08/txt/msg00742.txt.bz2 The problem is that there are other tests that run just fine even if no debugging symbols are found. This means if you change gdb_load to check if no debugging symbols are found and return a -ive value this might harm the other testcase. Or gdb_file_cmd can return a positive number like '1' when no debugging information is found which can be checked for in gdb.gdb/*.exp and exit the testcase. This way the other tests are not effected coz they check for $return < 0 I will be happy to submit that patch, and see if you like my idea. ----- manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cognito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ On Fri, 27 Aug 2004, Michael Chastain wrote: > Ouch, copying the whole text of gdb_file_cmd is no good, either! > That much duplicate code is bad. > > Here is my plan. > > gdb_file_cmd has a return value. None of the callers of gdb_file_cmd > uses the return vale, except for gdb_load, which simply returns the same > value. > > There are about 300 callers of gdb_load. Most of them don't use the > return value either. The exceptions are: > > gdb.base/remote.exp > gdb.base/sepdebug.exp > # does not use the return value but it wants to > gdb.gdb/complaints.exp > gdb.gdb/observer.exp > gdb.gdb/selftest.exp > gdb.gdb/xfullpath.exp > gdb.stabs/weird.exp > # does not use the return value but it wants to > lib/gdb.exp: > proc gdb_run_cmd > > So, I will do some infrastructure work: I will make gdb_load return > a better return value that includes more information, like a list > with more status information: > > success indicator > whatever sepdebug.exp is looking for > whatever weird.exp is looking for > indicator of whether debug symbols found or not > > While I am in there, I will see if I can get back any commonality > with mi_gdb_file_cmd. But that's optional. > > I expect to commit the new gdb_file_cmd sometime on Saturday. After > that, it will be easy for you to change gdb.gdb/*.exp to just use the > new information in the return value from gdb_load. > > Michael > > 2004-08-26 Manoj Iyer > * lib/gdb.exp (gdb_check_debuginfo): New procedure > * gdb.gdb/complaints.exp: check if gdb has debug information. > * gdb.gdb/observer.exp: check if gdb has debug information. > * gdb.gdb/selftest.exp: check if gdb has debug information. > * gdb.gdb/xfullpath.exp: check if gdb has debug information. >