From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23635 invoked by alias); 15 Nov 2008 16:10:24 -0000 Received: (qmail 23605 invoked by uid 22791); 15 Nov 2008 16:10:24 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 15 Nov 2008 16:09:44 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id A42E510C35; Sat, 15 Nov 2008 16:09:41 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 7D76C10544; Sat, 15 Nov 2008 16:09:41 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1L1NiO-00058H-Ct; Sat, 15 Nov 2008 11:09:40 -0500 Date: Sat, 15 Nov 2008 21:13:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [RFC] FRV: Skip call to __main in main() Message-ID: <20081115160940.GA19656@caradoc.them.org> Mail-Followup-To: Kevin Buettner , gdb-patches@sourceware.org References: <20081114161353.3495cc1e@mesquite.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081114161353.3495cc1e@mesquite.lan> User-Agent: Mutt/1.5.17 (2008-05-11) 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-11/txt/msg00385.txt.bz2 On Fri, Nov 14, 2008 at 04:13:53PM -0700, Kevin Buettner wrote: > For frv-elf (and perhaps other frv targets too), GCC now emits a call > to __main() in the prologue of main(). The patch below adds code to > test for this call and to skip over it so that placing a breakpoint in > main() will correctly cause the breakpoint to be placed on the first > statement instead of in the prologue. > > I submitted a similar patch for PPC a while back and was asked to fix > the hard-coded constants. However, the convention in frv-tdep.c seems > to be to use hard-coded constants preceded by a comment block showing > how the constant was derived. I chose to follow that convention in > this patch. No objections here. Some distant day in the future, I want to convert all of these things to work on output from libopcodes... -- Daniel Jacobowitz CodeSourcery