From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25659 invoked by alias); 14 Nov 2011 07:19:29 -0000 Received: (qmail 25643 invoked by uid 22791); 14 Nov 2011 07:19:27 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Nov 2011 07:19:13 +0000 Received: by bke17 with SMTP id 17so5326595bke.0 for ; Sun, 13 Nov 2011 23:19:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.152.87 with SMTP id f23mr9717042bkw.18.1321255150678; Sun, 13 Nov 2011 23:19:10 -0800 (PST) Received: by 10.204.59.212 with HTTP; Sun, 13 Nov 2011 23:19:10 -0800 (PST) In-Reply-To: References: Date: Mon, 14 Nov 2011 07:19:00 -0000 Message-ID: Subject: Re: Issue with GDB 7.0 on MIPS(gcc 4.4.1) From: naveen yadav To: Ian Lance Taylor Cc: gcc-help@gcc.gnu.org, gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00093.txt.bz2 Thanks Ian, Yes problem that sweep () function shows the argument of CVMgenMarkCompactCollect () function. sweep() function got inlined. So I just request is there any patch available to fix this problem ? Thanks On Mon, Nov 14, 2011 at 12:20 PM, Ian Lance Taylor wrote: > naveen yadav writes: > >> My GCC =A0version 4.4.1. and =A0here is source code. >> >> http://gingacdn.lavid.ufpb.br/projects/ginga-j/repository/revisions/7e23= 3c1906624b0e01698415987aada3fd8c3fe4/entry/gingaj/jvm/src/share/javavm/runt= ime/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. =A0The sweep function takes three > arugments: thisGen, base, and top. =A0It 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. =A0I don't > think you really needed me to tell you that. =A0I 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 > > >> >> =A0...... >> >> If you need more detail pls let me know.. >> Thanks. >> >> On Fri, Nov 11, 2011 at 10:01 PM, Ian Lance Taylor wro= te: >>> naveen yadav writes: >>> >>>> I am running one application and it generate core dump. When I run bt . >>>> (gdb) bt >>>> #0 =A0sweep (gn=3D0x5d5f58, ef=3D0x5c43000, Bytes=3D429496729, gcOs=3D= 0x5c3408f) >>>> #1 =A0CompactCollect (gn=3D0x5d5f58, ef=3D0x5c43000, Bytes=3D429496729= , 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. =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 >>> >