[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Java debugging



Jerry James wrote:
> To be able to debug a Java problem, I need class files compiled with
> -g and the source files.  Java packages set up for AOT compilation
> with GCJ do have debuginfo packages, but they are symbol files for the
> GCJ-compiled .so files only, with no source files.  Has anybody looked
> at what it would take to set things up for a reasonable Java debugging
> environment?  The source file problem can be solved pretty easily, I
> think, but what about compiling with -g?  I see 4 answers to that
> question:
> 
> 1. Never compile with -g.  People who want to debug have to recompile
> their own JARs.
> 2. Always compile with -g and make everybody eat the bloat.
> 3. Compile all Java code twice, once to create a debug JAR and once to
> create the normal distribution JAR.  The debug JAR goes into the
> corresponding debuginfo package.
> 4. Always compile with -g.  Store the original JAR in the
> corresponding debuginfo package, then strip out the debug symbols and
> put the resulting JAR into the regular package.

Most of this should not be necessary.  We have, or had, a modified version of
ecj that always generates debuginfo when an RPM is being compiled, so
if there exists any RPM that is missing debuginfo, that is a regression.

Also, when AOT-compiling, we should be generating the full paths for all
the source files and therefore all the sources should be in the debuginfo
packages.

Please tell me which package is missing these, and I'll find out which
of these mechanisms has broken.

Andrew.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]