From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19255 invoked by alias); 10 Jan 2008 17:06:53 -0000 Received: (qmail 19246 invoked by uid 22791); 10 Jan 2008 17:06:52 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 Jan 2008 17:06:26 +0000 Received: (qmail 2325 invoked from network); 10 Jan 2008 17:06:24 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Jan 2008 17:06:24 -0000 To: Mark Kettenis Cc: ebotcazou@adacore.com, brobecker@adacore.com, gdb-patches@sourceware.org Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? References: <20080109151745.GA13181@adacore.com> <20080109191535.GB19569@caradoc.them.org> <20080109194602.GF21281@adacore.com> <200801092140.43362.ebotcazou@adacore.com> <200801101058.m0AAw7HA023877@brahms.sibelius.xs4all.nl> <20080110140537.GB16061@caradoc.them.org> From: Jim Blandy Date: Thu, 10 Jan 2008 17:06:00 -0000 In-Reply-To: <20080110140537.GB16061@caradoc.them.org> (Daniel Jacobowitz's message of "Thu, 10 Jan 2008 09:05:37 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-01/txt/msg00241.txt.bz2 Daniel Jacobowitz writes: > On Thu, Jan 10, 2008 at 11:58:07AM +0100, Mark Kettenis wrote: >> If generating the right location information for -O0 is too difficult, >> perhaps the compiler should make life easier for itself and disable >> scheduling instructions into the prologue? > > It already doesn't do that at -O0. > > This part of the thread was about not skipping prologues at all; we > can't do that even with GCC, because the debug info says arguments > live in their stack slots. But they're in different incoming > locations until the end of the prologue (registers or other stack > slots). I tried this out on the IA-32. GCC left my original int and char * arguments in their incoming stack slots, and GDB printed them correctly at the function's entry point. When I changed one argument to a double, GCC generated code to copy that argument into the local frame, and GDB couldn't print it properly at the entry point. > I think we'd want debug info which only specified the > incoming locations and the local stack slots, not every load into a > register - which is probably what GCC tries to produce. That could be a nice solution. The amount of bloat would depend on how common those argument moves are in real life; I have no idea. (I wonder if there is a good way to improve the density of location lists. The format seems kind of rigid.)