From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25463 invoked by alias); 25 Aug 2004 05:03:03 -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 25449 invoked from network); 25 Aug 2004 05:03:01 -0000 Received: from unknown (HELO e31.co.us.ibm.com) (32.97.110.129) by sourceware.org with SMTP; 25 Aug 2004 05:03:01 -0000 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e31.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i7P52xgM394922; Wed, 25 Aug 2004 01:03:00 -0400 Received: from austin.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i7P52xxs206250; Tue, 24 Aug 2004 23:02:59 -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 i7P52wRn037762; Wed, 25 Aug 2004 00:02:58 -0500 Date: Wed, 25 Aug 2004 05:03:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: Michael Chastain cc: gdb@sources.redhat.com Subject: [RFC] GDB testsuite patch. In-Reply-To: <4125BB8B.nailJWP1FZGHJ@mindspring.com> Message-ID: References: <41251A45.nail58D215HD7@mindspring.com> <4125BB8B.nailJWP1FZGHJ@mindspring.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1883417520-1093408152=:7065" X-SW-Source: 2004-08/txt/msg00359.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --8323328-1883417520-1093408152=:7065 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-length: 4264 Hi all, Here is a patch to gdb/lib/gdb.exp, this patch handles the case when the GDB that is tested is stripped and has no debugging information. I have created this patch according to Michael's recomendations (see below). I tested this with gdb.gdb/complaints.exp and below are the new output. New output on screen ---------------- ======================= start paste ======================== Running target unix/-m32 Using ./dejagnu/baseboards/unix.exp as board description file for target. Using ./dejagnu/config/unix.exp as generic interface file for target. Using ./config/unix.exp as tool-and-target-specific interface file. Running ./gdb.gdb/complaints.exp ... === gdb Summary === # of untested testcases 1 /usr/bin/gdb version 6.1 -nx 0 ======================= end paste ====================== New output to gdb.log ----------------- ================== start paste ======================== Running target unix/-m32 Using ./dejagnu/baseboards/unix.exp as board description file for target. Using ./dejagnu/config/unix.exp as generic interface file for target. Using ./config/unix.exp as tool-and-target-specific interface file. Running ./gdb.gdb/complaints.exp ... GNU gdb 6.1^M Copyright 2004 Free Software Foundation, Inc.^M GDB is free software, covered by the GNU General Public License, and you are^M welcome to change it and/or distribute copies of it under certain conditions.^M Type "show copying" to see the conditions.^M There is absolutely no warranty for GDB. Type "show warranty" for details.^M This GDB was configured as "ppc-suse-linux".^M (gdb) set height 0^M (gdb) set width 0^M (gdb) file xgdb^M Reading symbols from xgdb...(no debugging symbols found)...done.^M Using host libthread_db library "/lib/tls/libthread_db.so.1".^M (gdb) UNTESTED: gdb.gdb/complaints.exp: skip tests no debugging information found. testcase ./gdb.gdb/complaints.exp completed in 0 seconds === gdb Summary === # of untested testcases 1 Executing on host: /usr/bin/gdb -nw --command gdb_cmd (timeout = 300) GNU gdb 6.1^M Copyright 2004 Free Software Foundation, Inc.^M GDB is free software, covered by the GNU General Public License, and you are^M welcome to change it and/or distribute copies of it under certain conditions.^M Type "show copying" to see the conditions.^M There is absolutely no warranty for GDB. Type "show warranty" for details.^M This GDB was configured as "ppc-suse-linux".^M /usr/bin/gdb version 6.1 -nx runtest completed at Tue Aug 24 18:23:46 2004 ========================= end paste ================================= ----- Manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cognito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ On Fri, 20 Aug 2004, Michael Chastain wrote: > Manoj Iyer wrote: > > Will get back to you on that. > > Okay. I can't accept any patches larger than trivial without > a copyright assignment, though. > > > The reason is, the GDB that is shipped in a distro is stripped, and I used > > the --tool_exec= option to use this GDB that is installed in /usr/bin. > > Ah, that is a valid use case for testing a stripped gdb. > > First it would help to file a PR to track this issue. > > It would be nice to have some common code for this. > > Three of the four test scripts in gdb.gdb have their own 'setup_test', > and the fourth script has another copy of the same code. I would like > to see the common code factored into one place, lib/self-support.exp. > > Then setup_test calls gdb_load which calls gdb_file_cmd. You could get > into gdb_file_cmd and detect "(no debugging symbols found)" and add a > channel to return that information. Or, in setup_test, you could > do something right after the call to gdb_load to check for debugging > symbols. > > If there are no debugging symbols, then I think that the test script > should return one UNRESOLVED result and not continue testing. > > I'm not sure UNRESOLVED is the right result. Perhaps UNTESTED would > be better. But not UNSUPPORTED -- UNSUPPORTED means that a feature > is missing in the system under test. > > Michael > --8323328-1883417520-1093408152=:7065 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="gdb.testsuite.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: GDB testsuite patch Content-Disposition: attachment; filename="gdb.testsuite.patch" Content-length: 814 ZGlmZiAtTmF1ciAuL29sZC9zcmMvZ2RiL3Rlc3RzdWl0ZS9saWIvZ2RiLmV4 cCAuL25ldy9zcmMvZ2RiL3Rlc3RzdWl0ZS9saWIvZ2RiLmV4cA0KLS0tIC4v b2xkL3NyYy9nZGIvdGVzdHN1aXRlL2xpYi9nZGIuZXhwCTIwMDQtMDgtMjQg MTg6MTY6MDAuODkyMTkwNzkyIC0wNTAwDQorKysgLi9uZXcvc3JjL2dkYi90 ZXN0c3VpdGUvbGliL2dkYi5leHAJMjAwNC0wOC0yNCAxODoxNjo0OS41NDIy NDkzMTIgLTA1MDANCkBAIC05NzUsNiArOTc1LDEwIEBADQogDQogICAgIHNl bmRfZ2RiICJmaWxlICRhcmdcbiINCiAgICAgZ2RiX2V4cGVjdCAxMjAgew0K KwktcmUgIlJlYWRpbmcgc3ltYm9scyBmcm9tLipubyBkZWJ1Z2dpbmcgc3lt Ym9scyBmb3VuZC4qICQiIHsNCisJICAgIHVudGVzdGVkICJza2lwIHRlc3Rz IG5vIGRlYnVnZ2luZyBpbmZvcm1hdGlvbiBmb3VuZC4iDQorCSAgICByZXR1 cm4gLTENCisJfQ0KICAgICAgICAgLXJlICJSZWFkaW5nIHN5bWJvbHMgZnJv bS4qZG9uZS4qJGdkYl9wcm9tcHQgJCIgew0KICAgICAgICAgICAgIHZlcmJv c2UgIlx0XHRMb2FkZWQgJGFyZyBpbnRvIHRoZSAkR0RCIg0KICAgICAgICAg ICAgIHJldHVybiAwDQo= --8323328-1883417520-1093408152=:7065--