From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1275 invoked by alias); 30 Aug 2012 14:45:53 -0000 Received: (qmail 1261 invoked by uid 22791); 30 Aug 2012 14:45:52 -0000 X-SWARE-Spam-Status: No, hits=-4.5 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,TW_IB X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Aug 2012 14:45:30 +0000 Received: by iaky10 with SMTP id y10so3484698iak.20 for ; Thu, 30 Aug 2012 07:45:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.140.9 with SMTP id rc9mr833025igb.18.1346337929822; Thu, 30 Aug 2012 07:45:29 -0700 (PDT) Received: by 10.50.5.163 with HTTP; Thu, 30 Aug 2012 07:45:29 -0700 (PDT) In-Reply-To: <503F7876.7030606@redhat.com> References: <50228C38.5080703@redhat.com> <502294A1.3060800@redhat.com> <50243480.7090803@redhat.com> <50254A50.8070208@redhat.com> <50255B35.9020705@redhat.com> <50258712.4070002@redhat.com> <502E6774.8050609@redhat.com> <503F7876.7030606@redhat.com> Date: Thu, 30 Aug 2012 14:45:00 -0000 Message-ID: Subject: Re: [PATCH] Set correct source location for deallocator calls From: Bryce McKinlay To: Richard Henderson Cc: Dehao Chen , Jason Merrill , Richard Guenther , gcc-patches@gcc.gnu.org, David Li , java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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-08/txt/msg00005.txt.bz2 On Thu, Aug 30, 2012 at 3:28 PM, Richard Henderson wrote: > On 08/17/2012 03:02 PM, Dehao Chen wrote: >> I spend a whole day working on this, but find it very difficult to add >> such a java test because: >> >> * First, libjava testsuits are all runtime tests, i.e., it compiles >> the byte code to native code, execute it, and compares the output to >> expected output. There is no way to scan the assembly. >> * Though there is a way to derive the line number at runtime in java >> (using Exception().getStackTrace()), this method only works on VM, and >> the gcj generated native code does not get the lineno. >> >> Any suggestions on this? > > Hmm, not from me, unfortunately. Cc'ing the java list for clues. > I won't hang up the main patch for this though. libjava calls out to addr2line to get the line number and source file name for stack traces. As long as it can find addr2line you should get a line number - but some platforms don't have it. Ref: libjava/stacktrace.cc and libjava/gnu/gcj/runtime/NameFinder.java