From owner-freebsd-alpha Wed Sep 5 2: 2: 7 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from angmar.mel.vet.com.au (angmar.mel.vet.com.au [203.39.245.7]) by hub.freebsd.org (Postfix) with ESMTP id 91DB637B40B for ; Wed, 5 Sep 2001 02:02:04 -0700 (PDT) Received: from nargothrond.ca.com (netscreen.mel.vet.com.au [203.39.245.2]) by angmar.mel.vet.com.au (Postfix) with ESMTP id 285F814F304 for ; Wed, 5 Sep 2001 19:02:42 +1000 (EST) Received: from [155.35.178.166] ([155.35.178.166]) by nargothrond.ca.com with esmtp; Wed, 05 Sep 2001 19:01:37 +1000 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Sender: odela01@nargothrond.ca.com (Unverified) Message-Id: Date: Wed, 5 Sep 2001 18:51:23 +1000 To: freebsd-alpha@freebsd.org From: Lachlan O'Dea Subject: gdb and function arguments Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I'm experiencing a problem using gdb. When I step into a function call, the arguments inside the function appear to have different values than they had in the caller. It seems that the stack frame is fine, gdb just isn't displaying the arguments properly. I've been searching for hints on this, and all I found was this message on the gdb list: http://sources.redhat.com/ml/gdb/2000-05/msg00151.html which says "A bigger problem is that GCC 2.95.2 doesn't output the right stabs for function arguments (and perhaps for local variables under some special circumstances). This makes debugging really painful, since function arguments will most likely have the wrong values in GDB." The thread then goes on to discuss how the problems can be solved, with fixing gcc appearing to be the preferred choice. So is this a problem with tools, or am I doing something wrong? If it's a bug, does it still exist in stable? Thanks for any insight. I'm running straight 4.3-RELEASE with a generic kernel. gcc version 2.95.3 [FreeBSD] 20010315 (release) gdb 4.18 -- Lachlan O'Dea Computer Associates Pty Ltd Webmaster Vet - Anti-Virus Software http://www.vet.com.au/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message