Several Days Later, GCJ 3.4 + MingW Still Equals Trouble

Ranjit Mathew
Thu May 8 13:20:00 GMT 2003

> >Didn't Dr MinGW tell you *anything* when the HelloWorld app
> >crashes?
>Not really. The stacktrace is incomplete and doesn't appear to
>be correct. I'm getting much further with printfs.

What I meant was that when your application crashes (assuming it
is with a GPF and not a "normal" Java runtime exception), Windows
shows you a dialogue box with buttons "OK" and "Cancel" - if you
click "OK", the application is terminated, while "Cancel" brings up
whichever JIT debugger is registered with Windows.

If you install Dr MinGW, it can help you pinpoint the location of the
error in applications compiled with MinGW GCC (of course with the "-g"

If you are getting a "normal" Java exception, but without line
number or method information and only hexadecimal addresses,
you can still narrow the source of the exception by doing something
like "nm HelloWorld.exe |sort -n >syms.txt" and for each address
in the stack trace, looking for the method with the "greatest address
less than" the given address in the file syms.txt.

>Is the COFF debugging format that gcc claims to be able to support
>compatible with MSVC? Can I build this with -gcoff and then debug
>it with MSVC?

MSVC stores the debugging information for a program in a file
separate from the program as either a DBG or a PDB file. The debugging
format is one of the many revisions of the CodeView format. These files
are the normally referred to "symbols" files and you can even download
symbols files for the core system DLLs from MS's site.

AFAIK, the MSVC debugger itself does not support the old COFF
(embedded) debugging information since they stopped using it a
long time ago.

The default format used with MinGW GCC is the "stabs" format which
is well understood by both GDB and Dr MinGW (via libbfd).


Want to get married? Try online matrimony. It's cool.

More information about the Java mailing list