From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7574 invoked by alias); 8 Mar 2004 14:42:34 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7567 invoked from network); 8 Mar 2004 14:42:33 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 8 Mar 2004 14:42:33 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i28EgWST017430 for ; Mon, 8 Mar 2004 09:42:32 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i28EgWM18076 for ; Mon, 8 Mar 2004 09:42:32 -0500 Received: from cygbert.vinschen.de (vpn50-16.rdu.redhat.com [172.16.50.16]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i28EgIR23352 for ; Mon, 8 Mar 2004 06:42:22 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 6BC59580E2; Mon, 8 Mar 2004 15:41:54 +0100 (CET) Date: Mon, 08 Mar 2004 14:42:00 -0000 From: Corinna Vinschen To: gdb@sources.redhat.com Subject: What is gdb.base/structs2.exp actually testing? Message-ID: <20040308144154.GE11141@cygbert.vinschen.de> Reply-To: gdb@sources.redhat.com Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-RedHat-Spam-Score: -4.9 X-SW-Source: 2004-03/txt/msg00043.txt.bz2 Hi, the subject already contains the question. What is the structs2 test good for? It's really not clear to me. There's a PR 13536 mentioned in the first line of structs2.c but this is a PRMS number and searching the gdb-patches archive didn't give me any useful hint. Is PRMS still accessible somewhere? The problem with this test is that it is based on the assumption, that GCC would not optimize away unused variables. The register arguments to param_reg are not reallyused, instead they only get values assigned. GCC is able to recognize this and to optimize away these assignments entirely, even in the non-optimize case! This happens for example on the SH target. The consequence of this fact is that the binary doesn't contain any debug information for the given register variables, so GDB doesn't know about them. In turn the testcase has two fails: FAIL: gdb.base/structs2.exp: structs2 continue1 (PRMS 13536) FAIL: gdb.base/structs2.exp: structs2 continue2 (PRMS 13536) due to the fact that the arguments are not printed, when the breakpoint is hit: Breakpoint 2, param_reg () at ... Are these tests really useful or shouldn't they either be dropped or modified to accomodate the above case? Any hints welcome, Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc.