This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Set correct source location for deallocator calls


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.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]