From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32152 invoked by alias); 23 May 2012 21:38:48 -0000 Received: (qmail 31909 invoked by uid 22791); 23 May 2012 21:38:45 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 May 2012 21:38:24 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4NLcJ7t002541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 23 May 2012 17:38:19 -0400 Received: from host2.jankratochvil.net (ovpn-116-78.ams2.redhat.com [10.36.116.78]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4NLcE7F013930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 23 May 2012 17:38:17 -0400 Date: Wed, 23 May 2012 21:38:00 -0000 From: Jan Kratochvil To: Siva Chandra Cc: gdb-patches@sourceware.org, Tom Tromey , Eli Zaretskii , Phil Muldoon , ratmice@gmail.com, Doug Evans Subject: [patch KFAIL] Re: FAILing new testcase for -fdebug-types-section (PR symtab/14148) Message-ID: <20120523213812.GA26412@host2.jankratochvil.net> References: <20120504180458.GA32257@host2.jankratochvil.net> <20120505070432.GA8744@host2.jankratochvil.net> <20120505071306.GA9206@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120505071306.GA9206@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2012-05/txt/msg00915.txt.bz2 On Sat, 05 May 2012 09:13:06 +0200, Jan Kratochvil wrote: > On Sat, 05 May 2012 09:10:44 +0200, Siva Chandra wrote: > > If you feel there > > is no urgency in eliminating the failure you are seeing, I will dig a > > little more into this and start a discussion in a few days. > > A patch should go in only if it is understood why. I have filed: -fdebug-types-section regresses ststic scope of types http://sourceware.org/bugzilla/show_bug.cgi?id=14148 As I do not intend to fix it proposing KFAIL below. The fix needs to start tracking types signatures during psymtab building to look up the type name during psymtab-scanning DW_TAG_variable. Thanks, Jan 2012-05-23 Siva Chandra Reddy Jan Kratochvil Setup KFAIL symtab/14148. * py-symbol.c (static_func): New static function. (main): New variable result1, call static_func. * py-symtab.exp (Test static_func in static symbols): New test. (Test simple_struct in static symbols): KFAIL it with .debug_types. diff --git a/gdb/testsuite/gdb.python/py-symbol.c b/gdb/testsuite/gdb.python/py-symbol.c index 8c6cdb1..92eb7cd 100644 --- a/gdb/testsuite/gdb.python/py-symbol.c +++ b/gdb/testsuite/gdb.python/py-symbol.c @@ -49,18 +49,25 @@ struct simple_struct int a; }; +static int +static_func (int a, int b) +{ + return a + b; +} + int main (int argc, char *argv[]) { #ifdef __cplusplus SimpleClass sclass; #endif int a = 0; - int result; + int result, result1; struct simple_struct ss = { 10 }; enum tag {one, two, three}; enum tag t = one; result = func (42); + result1 = static_func (5, 10); #ifdef __cplusplus sclass.seti (42); diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp index 6eec611..689b42a 100644 --- a/gdb/testsuite/gdb.python/py-symtab.exp +++ b/gdb/testsuite/gdb.python/py-symtab.exp @@ -71,6 +71,17 @@ gdb_test "python print \"func\" in global_symbols" "True" "Test func in global s gdb_test "python print \"main\" in global_symbols" "True" "Test main in global symbols" gdb_test "python print \"int\" in static_symbols" "True" "Test int in static symbols" gdb_test "python print \"char\" in static_symbols" "True" "Test char in static symbols" +gdb_test "python print \"static_func\" in static_symbols" "True" "Test static_func in static symbols" + +set readelf_program [transform readelf] +set command "exec $readelf_program -WS $binfile" +verbose -log "command is $command" +set result [catch $command output] +verbose -log "result is $result" +verbose -log "output is $output" +if {$result == 0 && [regexp { \.debug_types } $output]} { + setup_kfail symtab/14148 "*-*-*" +} gdb_test "python print \"simple_struct\" in static_symbols" "True" "Test simple_struct in static symbols" # Test is_valid when the objfile is unloaded. This must be the last