From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31113 invoked by alias); 27 Aug 2004 16:01:12 -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 31104 invoked from network); 27 Aug 2004 16:01:11 -0000 Received: from unknown (HELO hall.mail.mindspring.net) (207.69.200.60) by sourceware.org with SMTP; 27 Aug 2004 16:01:11 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by hall.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1C0jA0-0007V5-00; Fri, 27 Aug 2004 12:01:04 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id 7E1BB4B102; Fri, 27 Aug 2004 12:01:10 -0400 (EDT) Date: Fri, 27 Aug 2004 16:01:00 -0000 From: Michael Chastain To: manjo@austin.ibm.com Subject: Re: [RFC] GDB testsuite patch. (revised version) Cc: gdb-patches@sources.redhat.com Message-ID: <412F5AC5.nail34Y11MNPE@mindspring.com> References: <41251A45.nail58D215HD7@mindspring.com> <4125BB8B.nailJWP1FZGHJ@mindspring.com> <20040825124945.GA25217@nevyn.them.org> <412C98BD.nail10P1YTPHK@mindspring.com> <412F49BA.nailEDT11A0NY@mindspring.com> In-Reply-To: User-Agent: nail 10.8 6/28/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00746.txt.bz2 Manoj Iyer wrote: > 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. Right. You tried that, and Daniel pointed out that it was wrong, and I agreed. > I will be happy to submit that patch, and see if you like my idea. It's such a good idea, I already started implementing something like that. Here is the new header for gdb_file_cmd: # Load a file into the debugger. # The return value is a list with the following information: # # { message word ... } # # MESSAGE has the following values: # # "" file was loaded successfully # "..." file was not loaded successfully. # An error or perror has been generated with MESSAGE. # # If the MESSAGE is "", then there is an optional set of words. # The words may be: # # nodebug this file does not contain debug information # # TODO: gdb.base/sepdebug.exp and gdb.stabs/weird.exp might # be able to use this if they can get more information # in the return value. TCL is all about lists and strings, and it makes life a lot easier to return a nice list of strings. If this still looks like a good idea in a few hours, and I commit it, then you can write gdb.gdb/*.exp like this: set oldtimeout $timeout set timeout 600 verbose "Timeout is now $timeout seconds" 2 set status [gdb_load $executable] set timeout $oldtimeout verbose "Timeout is now $timeout seconds" 2 if { [lindex $status 0] != "" } then { # Error has already been printed. return -1 } if { [lsearch -exact [lreplace $status 0 0] "nodebug"] } then { untested "no debugging information for $executable" return -1 } Or something like that. How does that look?