From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12011 invoked by alias); 19 Aug 2011 18:15:57 -0000 Received: (qmail 11990 invoked by uid 22791); 19 Aug 2011 18:15:56 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Aug 2011 18:15:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C49052BB548; Fri, 19 Aug 2011 14:15:42 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id USYin2sRI1FS; Fri, 19 Aug 2011 14:15:42 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 76E3D2BB542; Fri, 19 Aug 2011 14:15:42 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2223E145615; Fri, 19 Aug 2011 14:15:34 -0400 (EDT) Date: Fri, 19 Aug 2011 18:15:00 -0000 From: Joel Brobecker To: Triple Yang Cc: Jan Kratochvil , gdb@sourceware.org Subject: Re: How to skip function prologues with stabs debug infomation? Message-ID: <20110819181534.GF20357@adacore.com> References: <20110819162807.GA27393@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2011-08/txt/msg00090.txt.bz2 > It's well-known that people can take advantage of SAL info when to > skip prologue with dwarf info. I wonder whether we can do the same > thing with stabs. I think you can achieve pretty much the same results with stabs as with DWARF. The SAL info in DWARF is more detailed, but if you only care about line numbers, it should be mostly OK. You do have to realize, however, that "skipping the prologue" is very vague in the case of optimized code, since you might have your prologue split in multiple blocks. Perhaps you meant skip all instructions that are associated to the prologue, even if it means skipping some instructions that are not part of the prologue. But, myself, I'd much rather stop at the first instruction associated to user code, which means that sometimes, part of the prologue might still not have been run yet. Debugging optimized code often means losing a lot of the convenient things we have when debugging non- optimized one. (and, really, if you are going to debug optimized code, you're going to have a lot of problems if you must use stabs - most of them probably worse than simple prologue skipping) -- Joel