From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21587 invoked by alias); 8 Mar 2004 16:32:21 -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 21576 invoked from network); 8 Mar 2004 16:32:20 -0000 Received: from unknown (HELO smtp10.atl.mindspring.net) (207.69.200.246) by sources.redhat.com with SMTP; 8 Mar 2004 16:32:20 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by smtp10.atl.mindspring.net with esmtp (Exim 3.33 #1) id 1B0Nfv-0000IM-00; Mon, 08 Mar 2004 11:32:19 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 198184B104; Mon, 8 Mar 2004 11:32:22 -0500 (EST) To: drow@false.org, gdb@sources.redhat.com Subject: Re: What is gdb.base/structs2.exp actually testing? Message-Id: <20040308163222.198184B104@berman.michael-chastain.com> Date: Mon, 08 Mar 2004 16:32:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-03/txt/msg00049.txt.bz2 drow> Personally, that seems like a very dubious optimization for GCC to be drow> making at -O0... we can't change the calling convention at -O0, so the drow> arguments are there, so GCC ought to emit enough information for us to drow> find them. You didn't mention what compiler version you're testing drow> with... Right. At gcc -O0, all the variables should exist whether the program uses them or not. From the gcc manual: Without `-O', the compiler's goal is to reduce the cost of compilation and to make debugging produce the expected results. Statements are independent: if you stop the program with a breakpoint between statements, you can then assign a new value to any variable or change the program counter to any other statement in the function and get exactly the results you would expect from the source code. I think that recent versions of gcc have been cavalier about this. I think it would help to have a pow-wow with gcc people and work out more specific requirements for gcc in this area. If gcc can't perform as the manual says, then we have to change the manual. Michael C