Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2001 22:11:42 +0100 (MET)
From:      j@uriah.heep.sax.de (Joerg Wunsch)
To:        freebsd-current@freebsd.org
Subject:   Re: weird -current gdb/gcc(?) problem
Message-ID:  <200110312111.f9VLBgM19567@uriah.heep.sax.de>
References:  <3BE03AF5.C0776836@digisle.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Maksim Yevmenkin <myevmenk@digisle.net> wrote:

> i have some weird problem.

Well, it would have been nice if you had told what you deemed to
be the problem. ;-)  I can't find any problem at all...

> Breakpoint 1, main () at prog1.c:8
> 8		return (foo(1, 2, '3', "test"));
> (gdb) s
> foo (i=1, s=10244, c=-54 'Ê', str=0x804855b "test") at prog1.c:13

If you mean it should look like:

foo (i=1, s=2, c=51 '3', str=0x804855b "test") at prog1.c:13

here, erm, no.  Your breakpoint simply hit before the function stack
frame initialization was complete, so gdb displays the wrong values at
that point.  Just type a single `s', followed by a `where', and you'll
see it will eventually get the argument list right then.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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