From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32103 invoked by alias); 12 Apr 2011 02:21:02 -0000 Received: (qmail 32095 invoked by uid 22791); 12 Apr 2011 02:21:01 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Apr 2011 02:20:57 +0000 Received: (qmail 10358 invoked from network); 12 Apr 2011 02:20:56 -0000 Received: from unknown (HELO ?192.168.0.102?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Apr 2011 02:20:56 -0000 Message-ID: <4DA3B701.3060902@codesourcery.com> Date: Tue, 12 Apr 2011 02:21:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: "optimized out" on gdb.base/gdb1090.exp References: <4DA3A7D0.2000701@linux.vnet.ibm.com> In-Reply-To: <4DA3A7D0.2000701@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00034.txt.bz2 On 04/12/2011 09:16 AM, Edjunior Barbosa Machado wrote: > Hi, > > running the testcase gdb.base/gdb1090.exp on ppc64 using gcc 4.3.4, > noticed an unexpected error in the second test: > > #1 0x00000000100005dc in foo () at > ../../../gdb.git/gdb/testsuite/gdb.base/gdb1090.c:39^M > 39 marker (s24);^M > (gdb) PASS: gdb.base/gdb1090.exp: up from marker > print s24^M > $1 = ^M > (gdb) FAIL: gdb.base/gdb1090.exp: print s24 > > According to readelf output, s24 uses r9, which is a volatile register. > However, the content is properly printed when using gcc 4.4.5 (var s24 > goes to r30, which is not volatile on power) > > Just wondering, can we consider this last test as untested (or even > pass) when print returns "optimized out", since it does not print > garbage (which was the original issue from gdb/1090)? > If we set breakpoint directly on a certain line of main(), and check the value of `s24' in main(). Can we get the value of `s24'? If we can, we may modify test case a little bit, instead of marking this case as untested (or even pass). -- Yao (齐尧)