[PATCH] Set correct source location for deallocator calls

Andrew Pinski pinskia@gmail.com
Wed Sep 5 07:31:00 GMT 2012


On Wed, Sep 5, 2012 at 12:29 AM, Andrew Haley <aph@redhat.com> 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



More information about the Java mailing list