Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Sep 2001 18:51:23 +1000
From:      Lachlan O'Dea <odela01@ca.com>
To:        freebsd-alpha@freebsd.org
Subject:   gdb and function arguments
Message-ID:  <f05100303b7bb7851400c@[155.35.178.166]>

next in thread | raw e-mail | index | archive | help
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 <mailto:lodea@vet.com.au>   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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f05100303b7bb7851400c>