From owner-freebsd-current Wed Oct 31 13:20: 7 2001 Delivered-To: freebsd-current@freebsd.org Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (Postfix) with ESMTP id 9C3DD37B401 for ; Wed, 31 Oct 2001 13:20:01 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.9.3/8.9.3) with UUCP id WAA11592 for freebsd-current@freebsd.org; Wed, 31 Oct 2001 22:20:00 +0100 (CET) Received: (from j@localhost) by uriah.heep.sax.de (8.11.6/8.11.6) id f9VLBgM19567; Wed, 31 Oct 2001 22:11:42 +0100 (MET) (envelope-from j) Date: Wed, 31 Oct 2001 22:11:42 +0100 (MET) Message-Id: <200110312111.f9VLBgM19567@uriah.heep.sax.de> Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <3BE03AF5.C0776836@digisle.net> From: j@uriah.heep.sax.de (Joerg Wunsch) Subject: Re: weird -current gdb/gcc(?) problem X-Original-Newsgroups: local.freebsd.current To: freebsd-current@freebsd.org Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Maksim Yevmenkin 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