From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25524 invoked by alias); 9 Jan 2008 19:16:48 -0000 Received: (qmail 25516 invoked by uid 22791); 9 Jan 2008 19:16:47 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Jan 2008 19:16:30 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.0) with ESMTP id m09JGLBm007955; Wed, 9 Jan 2008 20:16:21 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m09JGLPd004324; Wed, 9 Jan 2008 20:16:21 +0100 (CET) Date: Wed, 09 Jan 2008 19:16:00 -0000 Message-Id: <200801091916.m09JGLPd004324@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20080109151745.GA13181@adacore.com> (message from Joel Brobecker on Wed, 9 Jan 2008 07:17:45 -0800) Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? References: <20080109151745.GA13181@adacore.com> 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/msg00208.txt.bz2 > Date: Wed, 9 Jan 2008 07:17:45 -0800 > From: Joel Brobecker > > Hello, > > I would like to revive a discussion that started sometime in 2002. > The idea is the following: When breaking on a given source line, if > that line is inside a function prologue, skip the prologue (using > the linetable to do so). You've got me confused here. How can it be that if skipping using the line table helps, the breakpoint location (which I assume has been determined based on the line table) isn't right to begin with? > In our experience, we have found that most users are not aware of > the existence of function prologues. When they break on the line > where a function is defined, they think the debugger is doing the > same thing than it would do if it inserted the breakpoint using > that function name. Unfortunately, it doesn't and they end up > having problems trying to print parameter values [1]. Ultimately, the problem is that GCC is (still) generating the wrong debug information, since either: * The line table is wrong and the prologue instructions are wrongly attributed to a line of source code. * Instructions corresponding to source code have been scheduled into the prologue, but the compiler didn't generate location expressions for the arguments that are valid at that point.