From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16851 invoked by alias); 19 May 2006 11:38:31 -0000 Received: (qmail 16837 invoked by uid 22791); 19 May 2006 11:38:30 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 19 May 2006 11:38:28 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-11-237.inter.net.il [80.230.11.237]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id EFP13126 (AUTH halo1); Fri, 19 May 2006 14:38:25 +0300 (IDT) Date: Fri, 19 May 2006 12:26:00 -0000 Message-Id: From: Eli Zaretskii To: Mark Kettenis CC: gdb-patches@sourceware.org In-reply-to: <200605182004.k4IK49Eh003764@elgar.sibelius.xs4all.nl> (message from Mark Kettenis on Thu, 18 May 2006 22:04:09 +0200 (CEST)) Subject: Re: [RFC] Move the frame zero PC check earlier Reply-to: Eli Zaretskii 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> 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/msg00412.txt.bz2 > 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?