From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8666 invoked by alias); 28 Jan 2009 13:23:20 -0000 Received: (qmail 8650 invoked by uid 22791); 28 Jan 2009 13:23:18 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_63 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Jan 2009 13:23:12 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id n0SDN8hg074631 for ; Wed, 28 Jan 2009 14:23:09 +0100 (CET) Received: from mailserver.u-strasbg.fr (ms4.u-strasbg.fr [IPv6:2001:660:2402:d::13]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n0SDN8b4009411 for ; Wed, 28 Jan 2009 14:23:08 +0100 (CET) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (www-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n0SDN8p7070752 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 28 Jan 2009 14:23:08 +0100 (CET) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: References: <011801c92a03$4b71afa0$e2550ee0$@u-strasbg.fr> <001401c92af1$cf8821e0$6e9865a0$@u-strasbg.fr> <004a01c97f96$637bced0$2a736c70$@u-strasbg.fr> In-Reply-To: <004a01c97f96$637bced0$2a736c70$@u-strasbg.fr> Subject: [RFC] Use untested for macscp.exp if no macro information generated Date: Wed, 28 Jan 2009 13:32:00 -0000 Message-ID: <000001c9814b$919b63a0$b4d22ae0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00526.txt.bz2 I tried to simplify my patch for macro support in order to get less uninteresting failures. This test issues a huge number of failures if the debugging format does not support macro information. This is the default for gcc-3 on cygwin. make check RUNTESTFLAGS=gdb.base/macscp.exp results currently in: === gdb Summary === # of expected passes 69 # of unexpected failures 158 # of known failures 87 /usr/local/src/gdbcvs/build/gdb/testsuite/../../gdb/gdb version 6.8.50.20090127-cvs -nw -nx By forcing gcc-4 usage, make check RUNTESTFLAGS="gdb.base/macscp.exp CC_FOR_TARGET=gcc-4" === gdb Summary === # of expected passes 295 # of known failures 19 /usr/local/src/gdbcvs/build/gdb/testsuite/../../gdb/gdb version 6.8.50.20090127-cvs -nw -nx After this patch: make check RUNTESTFLAGS=gdb.base/macscp.exp results currently in: === gdb Summary === FAIL: gdb.base/macscp.exp: info macro WHERE after `list main' (undefined) === gdb Summary === # of expected passes 1 # of unexpected failures 1 # of untested testcases 1 /usr/local/src/gdbcvs/build/gdb/testsuite/../../gdb/gdb version 6.8.50.20090127-cvs -nw -nx The gcc-4 case remains unchanged which means that targets supporting macro debug information should remain unaffected by this patch. Is this lighter version OK? Once again, I was hesitating on the ChangeLog description... Pierre Muller Pascal language support maintainer for GDB gdb/testsuite/ChangeLog entry: 2009-01-28 Pierre Muller * gdb.base/macscp.exp (info_macro): Return undefined if undefined. (check_macro): Return 1 if undefined. If first test fails, check if macro debug information is available, and skip test completely if no macro information found. Index: gdb/testsuite/gdb.base/macscp.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/macscp.exp,v retrieving revision 1.19 diff -u -p -r1.19 macscp.exp --- gdb/testsuite/gdb.base/macscp.exp 3 Jan 2009 05:58:03 -0000 1.19 +++ gdb/testsuite/gdb.base/macscp.exp 28 Jan 2009 13:02:15 -0000 @@ -152,7 +152,7 @@ proc info_macro {macro} { switch -exact -- $definition { no-macro-info { return no-macro-info } timeout { return timeout } - undefined - + undefined { return undefined } default { if {[llength $location] >= 1} { return [concat $location [list $definition]] @@ -178,6 +178,10 @@ proc check_macro {macro expected where} xfail "executable includes no macro debugging information" return 1 } + undefined { + fail "info macro $macro $where (undefined)" + return 1 + } timeout { fail "info macro $macro $where (timeout)" } @@ -199,7 +203,33 @@ proc list_and_check_macro {func macro ex if {[list_and_check_macro main WHERE {macscp1.c {before macscp1_3}}]} { - return 0 + global verbose + set macro_support "unknown" + send_gdb "info source\n" + gdb_expect 10 { + -re "Includes preprocessor macro info\..*$gdb_prompt $" { + set macro_support 1 + verbose "Source has macro information" + } + -re "Does not include preprocessor macro info\..*$gdb_prompt $" { + set macro_support 0 + verbose "Source has no macro information" + } + -re "No current source file.*$gdb_prompt $" { + perror "get_macro_support used when no current source file" + } + -re "$gdb_prompt $" { + warning "couldn't check macro support (no valid response)." + } + timeout { + warning "couldn't check macro support (timed out)." + } + } + if {$macro_support != 1} { + verbose "Skipping $testfile because no macro information is included." + untested $testfile + return 0 + } } list_and_check_macro macscp2_2 WHERE {macscp2.h macscp1.c {before macscp2_2}} list_and_check_macro macscp3_2 WHERE {macscp3.h macscp1.c {before macscp3_2}}