From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10781 invoked by alias); 29 Oct 2013 15:16:37 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 10752 invoked by uid 89); 29 Oct 2013 15:16:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f182.google.com Received: from mail-lb0-f182.google.com (HELO mail-lb0-f182.google.com) (209.85.217.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 29 Oct 2013 15:16:35 +0000 Received: by mail-lb0-f182.google.com with SMTP id w6so141806lbh.41 for ; Tue, 29 Oct 2013 08:16:32 -0700 (PDT) X-Received: by 10.152.163.4 with SMTP id ye4mr104865lab.89.1383059792088; Tue, 29 Oct 2013 08:16:32 -0700 (PDT) Received: from [10.240.22.153] (static-92-33-14-100.sme.bredbandsbolaget.se. [92.33.14.100]) by mx.google.com with ESMTPSA id zc3sm16832154lbb.2.2013.10.29.08.16.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Oct 2013 08:16:31 -0700 (PDT) Message-ID: <526FD14D.6090101@gmail.com> Date: Tue, 29 Oct 2013 15:16:00 -0000 From: Krister Olofsson User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Tom Tromey CC: gdb@sourceware.org Subject: Re: gdb and variadic functions References: <526FCDDB.9090707@gmail.com> <87vc0g8670.fsf@fleche.redhat.com> In-Reply-To: <87vc0g8670.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00180.txt.bz2 Hi, yes I know that the versions is very old but it's the latest released for FreeBSD/ARM that I can find. Porting a new version could take some time... //Krister On 10/29/2013 04:09 PM, Tom Tromey wrote: >>>>>> "Krister" == Krister Olofsson writes: > > Krister> Building with -gstabs results in wrong value of argc and building with > Krister> -fvar-tracking gives wrong values of arguments in variadic functions. > > It's better not to use stabs. > > Krister> gcc version 4.2.1 20070719 [FreeBSD] > Krister> GNU gdb 6.1.1 [FreeBSD] > > You're using an old version of gcc and an amazingly old version of gdb. > > Using more current versions makes your test case work for me. So the > simple answer is that you are probably seeing a bug that was fixed > sometime in the last 6 years (gcc) or 9 years (gdb). > > Offhand I don't know what the bug might be. > > Tom >