From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18942 invoked by alias); 30 May 2009 08:04:59 -0000 Received: (qmail 18926 invoked by uid 22791); 30 May 2009 08:04:58 -0000 X-SWARE-Spam-Status: No, hits=-1.9 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.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 May 2009 08:04:53 +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 n4U84Wgk057529 ; Sat, 30 May 2009 10:04:32 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms3.u-strasbg.fr [IPv6:2001:660:2402:d::12]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id n4U84VPc036544 ; Sat, 30 May 2009 10:04:31 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id n4U84UJn068561 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Sat, 30 May 2009 10:04:30 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: Cc: "'Daniel Jacobowitz'" , References: <011801c92a03$4b71afa0$e2550ee0$@u-strasbg.fr> <001401c92af1$cf8821e0$6e9865a0$@u-strasbg.fr> <004a01c97f96$637bced0$2a736c70$@u-strasbg.fr> <000001c9814b$919b63a0$b4d22ae0$@u-strasbg.fr> <20090201182834.GE4597@caradoc.them.org> <000801c9860c$d5dc8ba0$8195a2e0$@u-strasbg.fr> <000001c9921b$cf82d500$6e887f00$@u-strasbg.fr> <000001c99335$837a4d30$8a6ee790$@u-strasbg.fr> <000d01c9d22b$9823cec0$c86b6c40$@u-strasbg.fr> In-Reply-To: Subject: RE: PING : [PING] [RFC-v2] Use untested for macscp.exp if no macro information generated Date: Sat, 30 May 2009 08:04:00 -0000 Message-ID: <000601c9e0fd$485f90a0$d91eb1e0$@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-05/txt/msg00646.txt.bz2 Thanks, Tom. Patch applied. Pierre For the record, here is what I checked in: ChangeLog entry: 2009-05-30 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 report unsupported test if no macro information is found. Index: gdb.base/macscp.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/macscp.exp,v retrieving revision 1.21 diff -u -p -r1.21 macscp.exp --- gdb.base/macscp.exp 29 Apr 2009 07:51:33 -0000 1.21 +++ gdb.base/macscp.exp 30 May 2009 07:54:43 -0000 @@ -155,7 +155,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]] @@ -181,6 +181,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)" } @@ -202,8 +206,28 @@ 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_test_multiple "info source" "Test macro information" { + -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" + } + default { + warning "couldn't check macro support (no valid response)." + } + } + if {$macro_support == 0} { + unsupported "Skipping test because debug information does not include macro information." + 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}}