On 6/27/06, Marco Trudel <mtrudel@gmx.ch> wrote:
> In any case, I had commented out a bit too much in
> getLineNumberForFrame() in my last patch with the result that
> offset was always set to 0. With that rectified as in the attached
> patch, I now get file and line number information as well in the
> stack trace (if addr2line is in the PATH, of course):
Question to that: I assume this only applies when classes aren't
compiled into an executable? For compiled classes, I get:
at Hello.foo(outWin.exe)
instead your mentioned
at Hello.foo(/home/rmathew/src/tmp/Hello.java:15)
You need to have compiled "Hello.java" with debugging
information turned on. For example:
gcj -g --main=Hello Hello.java
You also need to ensure that "addr2line" (from binutils)
is accessible from your PATH. If you have the MinGW
"bin" folder in your PATH, that should suffice.