From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24139 invoked by alias); 29 Dec 2009 19:07:58 -0000 Received: (qmail 24127 invoked by uid 22791); 29 Dec 2009 19:07:57 -0000 X-SWARE-Spam-Status: No, hits=-2.5 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; Tue, 29 Dec 2009 19:07:53 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 54F782BABA3 for ; Tue, 29 Dec 2009 14:07:51 -0500 (EST) 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 EMOJtOEnYPs0 for ; Tue, 29 Dec 2009 14:07:51 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B56F02BAB62 for ; Tue, 29 Dec 2009 14:07:50 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 7902AF5937; Tue, 29 Dec 2009 20:07:20 +0100 (CET) Date: Tue, 29 Dec 2009 19:07:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFC] frame_id_inner check and -fsplit-stack Message-ID: <20091229190720.GE24363@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2009-12/txt/msg00417.txt.bz2 Ian Taylor just reported on the GDB IRC that the frame_id_inner check in get_prev_frame_1 is making debugging difficult when the program has been built with -fsplit-stack. This option <>. As a result, if two frames are on different stack segments, the ordering of the segments might be such that two valid frames might be failing the frame_id_inner check. Discussing with Ian, he indicated that it should be easy to produce a section with magic name. This would allow us to determine that the program uses split-stack and that the frame_id_inner may not apply. I can see the following options: 1. do nothing (ahem); 2. remove the check entirely; we currently apply it I think when the two frames are normal frames. We already skip it when either frame is not normal. 3. provide a user setting that allows the user to tell GDB that the program uses split stacks; 4. skip the test when split stacks is detected. I don't think we should really consider option (3) if we can indeed easily detect split-stack. (1) seems a bit harsh. I am Ok with either (2) or (4). It sounds like Ian is willing to make it easy for us to detect split-stack, so I'd vote for (4). Given that nearly all the code we debug does not use split-stack, we can keep the frame_id_inner check a while longer... Thoughts? -- Joel