From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16624 invoked by alias); 4 Sep 2008 20:46:54 -0000 Received: (qmail 16614 invoked by uid 22791); 4 Sep 2008 20:46:53 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 04 Sep 2008 20:46:01 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id m84Kj4Nl480414 for ; Thu, 4 Sep 2008 20:45:04 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m84Kj4Ze4362360 for ; Thu, 4 Sep 2008 22:45:04 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m84Kj4wd013697 for ; Thu, 4 Sep 2008 22:45:04 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m84Kj4Yr013694; Thu, 4 Sep 2008 22:45:04 +0200 Message-Id: <200809042045.m84Kj4Yr013694@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 4 Sep 2008 22:45:04 +0200 Subject: Re: how to examine data with compiler optimization option set? To: fche@redhat.com (Frank Ch. Eigler) Date: Thu, 04 Sep 2008 20:46:00 -0000 From: "Ulrich Weigand" Cc: eliz@gnu.org (Eli Zaretskii), schwab@suse.de (Andreas Schwab), dewar@adacore.com, msnyder@vmware.com, brobecker@adacore.com, jreiver@free.fr, gdb@sourceware.org, aoliva@redhat.com (Alexandre Oliva) In-Reply-To: <20080904180918.GL19287@redhat.com> from "Frank Ch. Eigler" at Sep 04, 2008 02:09:18 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2008-09/txt/msg00032.txt.bz2 Frank Ch. Eigler wrote: > On Thu, Sep 04, 2008 at 06:55:15PM +0300, Eli Zaretskii wrote: > > [...] > > > If parameters are passed in registers they are very likely to get lost. > > > > Then the compiler should, under -ggdb, emit code and debug info that > > allow GDB finding these parameters somewhere. > > And it should. Current GCC policy is that -g never changes anything in the emitted code. If you build with and without -g and then strip the binaries, they are supposed to be identical. This seems a useful property to me ... However, this is not to say there couldn't be some other option that did change code generation like that. (In any case, even without changing code generation, there seems to be a lot of possibilities to simply generate better debug info describing what's there!) Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com