From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9686 invoked by alias); 14 Nov 2011 18:01:59 -0000 Received: (qmail 9655 invoked by uid 22791); 14 Nov 2011 18:01: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-gy0-f169.google.com (HELO mail-gy0-f169.google.com) (209.85.160.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Nov 2011 18:01:38 +0000 Received: by gyg10 with SMTP id 10so6150044gyg.0 for ; Mon, 14 Nov 2011 10:01:38 -0800 (PST) Received: by 10.68.24.234 with SMTP id x10mr50919085pbf.97.1321293697616; Mon, 14 Nov 2011 10:01:37 -0800 (PST) Received: by 10.68.24.234 with SMTP id x10mr50918880pbf.97.1321293696015; Mon, 14 Nov 2011 10:01:36 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id lk8sm58236469pbb.4.2011.11.14.10.01.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Nov 2011 10:01: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 18:01:00 -0000 In-Reply-To: (naveen yadav's message of "Mon, 14 Nov 2011 12:49:10 +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/msg00094.txt.bz2 naveen yadav writes: > So I just request is there any patch available to fix this problem ? I don't know. As I said earlier, current versions of gcc are much better at debugging info for inlined functions, and are much better at not incorrectly reporting variable values for optimized code. However, I have no idea whether that will help with this specific problem. Ian > On Mon, Nov 14, 2011 at 12:20 PM, Ian Lance Taylor wrot= e: >> naveen yadav writes: >> >>> My GCC =C2=A0version 4.4.1. and =C2=A0here is source code. >>> >>> http://gingacdn.lavid.ufpb.br/projects/ginga-j/repository/revisions/7e2= 33c1906624b0e01698415987aada3fd8c3fe4/entry/gingaj/jvm/src/share/javavm/run= time/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. =C2=A0The sweep function takes three >> arugments: thisGen, base, and top. =C2=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. =C2=A0I = don't >> think you really needed me to tell you that. =C2=A0I don't know where th= e bug >> is, but my guess would be that gcc 4.4.1 is not generating correct debug >> info for inlined functions. >> >> Ian >> >> >>> >>> =C2=A0...... >>> >>> If you need more detail pls let me know.. >>> Thanks. >>> >>> On Fri, Nov 11, 2011 at 10:01 PM, Ian Lance Taylor wr= ote: >>>> 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, gcO= s=3D0x5c3408f) >>>>> #1 =C2=A0CompactCollect (gn=3D0x5d5f58, ef=3D0x5c43000, Bytes=3D42949= 6729, 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 paramet= er >>>> >>>> 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 got= ten >>>> quite a bit better about debug info for inlined functions and in gener= al >>>> for avoiding incorrect display of variables in optimized code. >>>> >>>> Ian >>>> >>