From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28953 invoked by alias); 19 May 2006 17:38:44 -0000 Received: (qmail 28929 invoked by uid 22791); 19 May 2006 17:38:41 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 19 May 2006 17:38:39 +0000 Received: (qmail 22816 invoked from network); 19 May 2006 17:38:37 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 19 May 2006 17:38:37 -0000 To: Eli Zaretskii Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [RFC] Move the frame zero PC check earlier References: <20060510180312.GA12606@nevyn.them.org> <200605130946.k4D9kZ2M001331@elgar.sibelius.xs4all.nl> <20060513151338.GB3721@nevyn.them.org> <200605131642.k4DGgiqa018273@elgar.sibelius.xs4all.nl> <20060516204503.GC13210@nevyn.them.org> <200605162137.k4GLbZiS014187@elgar.sibelius.xs4all.nl> <20060516221837.GA15617@nevyn.them.org> <1147815745.3672.163.camel@dufur.beaverton.ibm.com> <20060517155729.GF27234@adacore.com> <446C3EB3.1040606@st.com> <1147969938.3672.168.camel@dufur.beaverton.ibm.com> <200605182004.k4IK49Eh003764@elgar.sibelius.xs4all.nl> From: Jim Blandy Date: Fri, 19 May 2006 18:12:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Fri, 19 May 2006 14:38:32 +0300") 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00416.txt.bz2 Eli Zaretskii writes: >> Date: Thu, 18 May 2006 22:04:09 +0200 (CEST) >> From: Mark Kettenis >> CC: pgilliam@us.ibm.com, andrew.stubbs@st.com, brobecker@adacore.com, drow@false.org, mark.kettenis@xs4all.nl, gdb-patches@sourceware.org >> >> > The only reason presented in this thread for displaying those frames >> > at all is that it can be an indication of a bug in GDB. >> >> No. There are two reasons why we should print those frames, and I >> consider both of them not to be an indication of a bug in GDB. >> >> 1. Because of a bug in the program you're debugging, it has >> overwritten the return address on the stack. Currently this causes >> the extra frame to be printed signalling the user that something is >> wrong. Daniel's patch changes this, but only if the return address >> is overwritten with zero. >> >> 2. It may be fundamentally impossible to unwind code produced by an >> optimizing compiler without additional debug info. We can't >> consider the fact that GDB gets the return address wrong if the >> debug info is missing a bug in GDB. Again the extra frame signals >> the user that something is wrong. > > I think it was already suggested in this lengthy thread to display > some kind of message to alert the user. For example: > > (Backtrace terminated due to zero return address.) > > Would this make everybody fairly happy to zero in on a solution? (UNFAIR UNHAPPINESS ABOUT NON-ZERO SOLUTIONS FOR EVERYBODY!!!) Well, no: the stacks we'd like to display are healthy and well-formed, according to the conventions of the system; there's nothing non-standard about them at all. So they ought to display as normal stacks --- on those systems.