From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4483 invoked by alias); 10 Oct 2008 16:04:46 -0000 Received: (qmail 4472 invoked by uid 22791); 10 Oct 2008 16:04:45 -0000 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Oct 2008 16:04:03 +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 m9AG3jTs081315 ; Fri, 10 Oct 2008 18:03:45 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402::141]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id m9AG3jDk025776 ; Fri, 10 Oct 2008 18:03:45 +0200 (CEST) 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 m9AG3jFC093959 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Fri, 10 Oct 2008 18:03:45 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: , References: <011801c92a03$4b71afa0$e2550ee0$@u-strasbg.fr> In-Reply-To: Subject: [RFC] RE: Results of macscp.exp test on cygwin Date: Fri, 10 Oct 2008 16:04:00 -0000 Message-ID: <001401c92af1$cf8821e0$6e9865a0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (mailhost.u-strasbg.fr [IPv6:2001:660:2402::155]); Fri, 10 Oct 2008 18:03:46 +0200 (CEST) X-Virus-Status: Clean 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: 2008-10/txt/msg00323.txt.bz2 Just a small note to confirm that your commit did remove all FAIL for make check RUNTESTFLAGS="gdb.base/macscp.exp CC_FOR_TARGET=\"gcc-4 -gdwarf-2\"" I now only get 19 KFAIL, all tagged as PRMS gdb/555. But as said in my first email, on cygwin, in order to get those good results, you need both to use gcc version 4 and explicit dwarf-2 debug format. Thanks, Tom! Daniel, suggested to skip the test rather than forcing anything, but my knowledge of dejagnu is poor. I tried to write a patch. First , I added a check for gcc version, and skip the test if main version is >=3 (first part of the patch below). Second, for the debugging format, I used the result of 'info source' command as in gdb.exp get_debug_format procedure. This only only works if the debuggee is already started, so I postponed the test after the runto_main command. This generates 5 FAIL but when I tried to move the runto_main earlier in the macscp.exp I generated new failures for the "working case" i.e. gcc version 4.3.2. By the way, I discovered while doing this that for gcc-4 dwarf-2 is the default debugging format for cygwin target. Thus: make check RUNTESTFLAGS="gdb.base/macscp.exp CC_FOR_TARGET=gcc-4" also gives me "292 PASS and 19 KFAIL" I wanted to give an explanation of the reasons of the skipping, and I first inserted this into the untested procedure argument, but I later saw that this argument seems to always be a filename, this is the reason of the use of the warning function, but I am also not really sure that warning is the correct function to use in such a case... Pierre Muller Pascal language support maintainer for GDB gdb/testsuite ChangeLog entry: 2008-10-10 Pierre Muller * gdb.base/macscp.exp: Skip test if gcc version below 4 or if preprocessor macro information is not available. Index: gdb.base/macscp.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/macscp.exp,v retrieving revision 1.15 diff -u -p -r1.15 macscp.exp --- gdb.base/macscp.exp 9 Oct 2008 16:49:47 -0000 1.15 +++ gdb.base/macscp.exp 10 Oct 2008 16:01:04 -0000 @@ -42,6 +42,14 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} +if {[info exists gcc_compiled] && ($gcc_compiled >= 4)} { + # we are using gcc version 4.X.X + # Lets continue the test +} else { + warning "macscp.exp test skipped because gcc version is $gcc_compiled" + untested macscp.exp + return -1 +} # Ask GDB to show the current definition of MACRO, and return a list # describing the result. @@ -322,6 +330,52 @@ foreach func_entry $funcs { gdb_test "break $func" "Breakpoint.*" } +global macro_support + +set macro_support "unknown" + +proc get_macro_support { } { + global gdb_prompt + global verbose + global macro_support + + send_gdb "info source\n" + gdb_expect 10 { + -re "Includes preprocessor macro info.\r\n.*$gdb_prompt $" { + set macro_support 1 + verbose "Source has macro information" + return 1; + } + -re "Does not include preprocessor macro info.\r\n.*$gdb_prompt $" { + set macro_support 0 + verbose "Source has no macro information" + return 1; + } + -re "No current source file.\r\n$gdb_prompt $" { + perror "get_macro_support used when no current source file" + return 0; + } + -re "$gdb_prompt $" { + warning "couldn't check macro support (no valid response)." + return 1; + } + timeout { + warning "couldn't check macro support (timed out)." + return 1; + } + } +} + +get_macro_support + +if {$macro_support != 1} { + warning "macscp.exp test skipped because source has no macro information" + untested macscp.exp + return -1 +} + + + # Run to each of the breakpoints and check the definition (or lack # thereof) of each macro. for {set i 0} {$i < [llength $funcs]} {incr i} {