From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11876 invoked by alias); 6 Aug 2008 18:11:23 -0000 Received: (qmail 11854 invoked by uid 22791); 6 Aug 2008 18:11:22 -0000 X-Spam-Check-By: sourceware.org Received: from aussmtpmrkpc120.us.dell.com (HELO aussmtpmrkpc120.us.dell.com) (143.166.82.159) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Aug 2008 18:09:51 +0000 X-IronPort-AV: E=Sophos;i="4.31,315,1215406800"; d="scan'208";a="353249161" Received: from unknown (HELO M31.equallogic.com) ([12.110.134.31]) by aussmtpmrkpc120.us.dell.com with SMTP; 06 Aug 2008 13:09:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18585.59545.663358.551495@gargle.gargle.HOWL> Date: Wed, 06 Aug 2008 18:11:00 -0000 From: Paul Koning To: Joe.Buck@synopsys.COM Cc: mark.kettenis@xs4all.nl, drow@false.org, gcc@sources.redhat.com, sposelenov@emcraft.com, gdb@sources.redhat.com Subject: Re: Problem reading corefiles on ARM References: <4899C0FE.4010008@emcraft.com> <20080806152736.GA31492@caradoc.them.org> <200808061542.m76FgmUv017348@brahms.sibelius.xs4all.nl> <18585.51522.726379.18666@gargle.gargle.HOWL> <20080806170912.GL18206@synopsys.com> <18585.57711.850217.939413@gargle.gargle.HOWL> <20080806175125.GM18206@synopsys.com> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-IsSubscribed: yes 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-08/txt/msg00112.txt.bz2 >>>>> "Joe" == Joe Buck writes: Joe> I wrote: There are several effects from "noreturn". We would Joe> want some of these effects for "abort", but not others, to get Joe> debuggable code without degrading compile-time warnings. Joe> On Wed, Aug 06, 2008 at 01:37:51PM -0400, Paul Koning wrote: >> So the issue is that two unrelated features are currently combined >> in a single attribute: >> >> 1. This function doesn't return, do the right thing with warnings >> in the caller of this function. >> >> 2. Don't bother saving registers when calling this function >> because it won't return so the registers aren't needed afterwards. >> >> The issue is that #2 doesn't apply to "abort" because the >> registers ARE needed afterwards -- at debug time. Joe> But not necessarily all of them (depending on platform). That Joe> is, the caller-saved registers don't have to be saved because Joe> the function isn't returning, but there has to be enough of a Joe> stack frame so that a debugger can set a breakpoint on the abort Joe> and determine who the caller was. That's sufficient for live debugging but not for corefiles. In that case you do want caller-saved registers, because they may contain local variable values that don't live in memory at the time of the abort call. paul