From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15396 invoked by alias); 14 Nov 2011 06:50:56 -0000 Received: (qmail 15380 invoked by uid 22791); 14 Nov 2011 06:50:55 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Nov 2011 06:50:38 +0000 Received: by iaek3 with SMTP id k3so5328462iae.0 for ; Sun, 13 Nov 2011 22:50:38 -0800 (PST) Received: by 10.50.173.74 with SMTP id bi10mr23322415igc.4.1321253437316; Sun, 13 Nov 2011 22:50:37 -0800 (PST) Received: by 10.50.173.74 with SMTP id bi10mr23322356igc.4.1321253436357; Sun, 13 Nov 2011 22:50:36 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id ew6sm16108439igc.4.2011.11.13.22.50.34 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 13 Nov 2011 22:50:35 -0800 (PST) From: Ian Lance Taylor To: naveen yadav Cc: gcc-help@gcc.gnu.org, gdb@sourceware.org Subject: Re: Issue with GDB 7.0 on MIPS(gcc 4.4.1) References: Date: Mon, 14 Nov 2011 06:50:00 -0000 In-Reply-To: (naveen yadav's message of "Mon, 14 Nov 2011 10:44:38 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 X-SW-Source: 2011-11/txt/msg00092.txt.bz2 naveen yadav writes: > My GCC version 4.4.1. and here is source code. > > http://gingacdn.lavid.ufpb.br/projects/ginga-j/repository/revisions/7e233= c1906624b0e01698415987aada3fd8c3fe4/entry/gingaj/jvm/src/share/javavm/runti= me/gc/generational/gen_markcompact.c > > and here is backtrace. > > mips-gdb> bt > sweep (gen=3D0x5d5f508, ee=3D0x5c4300d0, numBytes=3D4294967295, > gcOpts=3D0x5c3408f8) #1 > CVMgenMarkCompactCollect (gen=3D0x5d5f508, ee=3D0x5c4300d0, > numBytes=3D4294967295, gcOpts=3D0x5c3408f8) Looking at the code, it's perfectly obvious that gdb is reporting the arguments to sweep incorrectly. The sweep function takes three arugments: thisGen, base, and top. It is called only from CVMgenMarkCompactCollect, and that function takes four arguments, gen, ee, numBytes, and gcOpts. Clearly the parameters to sweep are being reported incorrectly. I don't think you really needed me to tell you that. I don't know where the bug is, but my guess would be that gcc 4.4.1 is not generating correct debug info for inlined functions. Ian > > ...... > > If you need more detail pls let me know.. > Thanks. > > On Fri, Nov 11, 2011 at 10:01 PM, Ian Lance Taylor wrot= e: >> naveen yadav writes: >> >>> I am running one application and it generate core dump. When I run bt . >>> (gdb) bt >>> #0 =C2=A0sweep (gn=3D0x5d5f58, ef=3D0x5c43000, Bytes=3D429496729, gcOs= =3D0x5c3408f) >>> #1 =C2=A0CompactCollect (gn=3D0x5d5f58, ef=3D0x5c43000, Bytes=3D4294967= 29, gcOs=3D0x5c3408f) >>> ... >>> >>> In above case >>> we got crash in wepp(). >>> CompactCollect () is main function and wepp() is another function >>> which got called from CompactCollect (). >>> >>> When I check the assembly wepp() become inline. >>> So i got bit surprise when i check that function parameter;s for both >>> wepp() and CompactCollect () are same. >>> >>> So is it correct behaviour ? that calling and calle have same parameter >> >> Without any information about the source code, I don't see how we can >> tell whether having the same parameters is correct behaviour or not. >> >> That said, it is certainly possible that the arguments of the inlined >> function are not being displayed correctly. =C2=A0Mainline gcc has gotten >> quite a bit better about debug info for inlined functions and in general >> for avoiding incorrect display of variables in optimized code. >> >> Ian >>