From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21918 invoked by alias); 5 Sep 2012 07:31:11 -0000 Received: (qmail 21900 invoked by uid 22791); 5 Sep 2012 07:31:10 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_GC X-Spam-Check-By: sourceware.org Received: from mail-we0-f175.google.com (HELO mail-we0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Sep 2012 07:30:57 +0000 Received: by weyr6 with SMTP id r6so184950wey.20 for ; Wed, 05 Sep 2012 00:30:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.74.133 with SMTP id t5mr36079493wiv.2.1346830255769; Wed, 05 Sep 2012 00:30:55 -0700 (PDT) Received: by 10.216.2.4 with HTTP; Wed, 5 Sep 2012 00:30:55 -0700 (PDT) In-Reply-To: <5046FF48.4070907@redhat.com> References: <50255B35.9020705@redhat.com> <50258712.4070002@redhat.com> <502E6774.8050609@redhat.com> <503F7876.7030606@redhat.com> <503F84A9.8010504@redhat.com> <503F95D8.5010506@redhat.com> <50463661.1020303@redhat.com> <50463875.7000006@redhat.com> <5046FF48.4070907@redhat.com> Date: Wed, 05 Sep 2012 07:31:00 -0000 Message-ID: Subject: Re: [PATCH] Set correct source location for deallocator calls From: Andrew Pinski To: Andrew Haley Cc: Dehao Chen , Richard Guenther , gcc-patches@gcc.gnu.org, java@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2012-09/txt/msg00011.txt.bz2 On Wed, Sep 5, 2012 at 12:29 AM, Andrew Haley wrote: > On 09/04/2012 09:31 PM, Dehao Chen wrote: >> Looks like even with addr2line properly installed, the gcj generated >> code cannot get the correct source file/lineno. Do I need to pass in >> >> #javac stacktrace.java >> #java stacktrace >> stacktrace.e(stacktrace.java:42) >> stacktrace.d(stacktrace.java:38) >> stacktrace.c(stacktrace.java:31) >> stacktrace.b(stacktrace.java:26) >> stacktrace.a(stacktrace.java:19) >> stacktrace.main(stacktrace.java:12) >> #gcj *.class -o stacktrace.exe >> #./stacktrace.exe >> stacktrace.e(stacktrace.exe:-1) >> stacktrace.d(stacktrace.exe:-1) >> stacktrace.c(stacktrace.exe:-1) >> stacktrace.b(stacktrace.exe:-1) >> stacktrace.a(stacktrace.exe:-1) >> stacktrace.main(stacktrace.exe:-1) > > Works for me: > > [aph@nighthawk ~]$ gcj stacktrace.java --main=stacktrace -g > [aph@nighthawk ~]$ ./a.out > stacktrace.e(stacktrace.java:42) > stacktrace.d(stacktrace.java:38) > stacktrace.c(stacktrace.java:31) > stacktrace.b(stacktrace.java:26) > stacktrace.a(stacktrace.java:19) > stacktrace.main(stacktrace.java:12) > > Aren't you just compiling without -g ? There is no debuginfo. The other thing that might be needed is a newer addr2line which works correctly with the dwarf2(4) that GCC outputs. Thanks, Andrew