From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13121 invoked by alias); 1 Feb 2005 17:20:01 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13016 invoked from network); 1 Feb 2005 17:19:54 -0000 Received: from unknown (HELO pixel.clearspeed.com) (195.10.240.2) by sourceware.org with SMTP; 1 Feb 2005 17:19:54 -0000 Received: from Pixie193.pixelfusion.co.uk (Pixie193.pixelfusion.co.uk [192.168.0.193]) by pixel.clearspeed.com (8.12.10/8.12.10) with ESMTP id j11HJk54025539 for ; Tue, 1 Feb 2005 17:19:46 GMT Date: Tue, 01 Feb 2005 17:20:00 -0000 From: Con Bradley Reply-To: Con Bradley Organization: Clearspeed Message-ID: <734804467.20050201171842@clearspeed.com> To: gdb@sources.redhat.com Subject: Dwarf 2 Stack pointer unwind. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00012.txt.bz2 Hi, We have an ABI where the stack pointer is never saved to the stack on a function call and there is NO frame pointer. Instead the stack is maintained by stack pointer increments and decrements. How does one describe this in Dwarf Call Frame Instructions? The only rules available for register operations are to save on the stack or to copy to another register. No rules to describe plus or negative register adjustments. I find it difficult to understand why there is no support for this in Dwarf 2 or Dwarf 3 as this must be a common idiom. When we adjust the stack pointer we issue CFA_CFA_def_cfa operations to describe the new rule to access the CFA, effectively issuing a CFA rule to compensate for the stack pointer being changed. This is sufficient to allow stack unwind to work. However, when we look up the values of automatics in upper stack frames this fails. The reason being that the address of these variables (in location expressions) is given as an offset from the stack pointer but there appear to be no unwind rules for the stack pointer register. More correctly we'd like to say that the address of an automatic was CFA plus offset but there doesn't appear to be any support for this. How does one describe stack pointer changes which do not involve saving on the stack or use of a frame pointer. Con Bradley.