This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: [MinGW] RFC/RFA: Get Partial Stack Traces on Windows


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.

HTH,
Ranjit.

--
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA. Web: http://rmathew.com/


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