From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15949 invoked by alias); 22 Jan 2002 12:09:38 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15917 invoked from network); 22 Jan 2002 12:09:36 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 22 Jan 2002 12:09:36 -0000 Received: by fw-cam.cambridge.arm.com; id MAA17143; Tue, 22 Jan 2002 12:09:35 GMT Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma016606; Tue, 22 Jan 02 12:09:14 GMT Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA09460; Tue, 22 Jan 2002 10:27:33 GMT Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA28112; Tue, 22 Jan 2002 10:27:33 GMT Message-Id: <200201221027.KAA28112@cam-mail2.cambridge.arm.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Michael Snyder cc: fnf@redhat.com, gdb-patches@sources.redhat.com, Richard.Earnshaw@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: [RFC] "info registers" is misleading In-reply-to: Your message of "Mon, 21 Jan 2002 23:08:36 PST." <3C4D0FF4.57D1@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 22 Jan 2002 04:09:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-01/txt/msg00688.txt.bz2 msnyder@redhat.com said: > This is an old old issue. The frame pointer register is special. > Info registers does not show the actual value of the fp register -- it > shows the virtual frame pointer (the address of the function's stack > frame). Usually it's the same value -- unles you're in a frameless > function (ie. one that does not use the frame pointer register). > Now that we have pseudo-registers, we've talked about adding a > pseudo-frame-pointer register and using it for FP_REGNUM, so that the > "real" frame pointer register can always display its real value. Indeed. It isn't even confined to Thumb code. If you have ARM code compiled with -fomit-frame-pointer, then gdb will confuse the stack-pointer and frame-pointer registers. Very hard to work out what is happening, especially if you want to force a register. If we add extra gloop to "info registers" for printing out the pseudo-frame-pointer register, then please don't call it "fp" (or at least allow a target to provide its own name): "fp" is a well-known alias on the arm (defined by the APCS) for r11. Users should be able to use fp as the ARM register r11 and will get confused if it represents anything else. R.