--- org/eclipse/jdt/internal/compiler/batch/Main.java.orig 2007-07-05 09:50:28.000000000 +0200 +++ org/eclipse/jdt/internal/compiler/batch/Main.java 2009-04-07 15:30:05.000000000 +0200 @@ -2340,6 +2340,28 @@ for (int i = 0; i < argCount; i++) { newCommandLineArgs[i] = newCommandLineArgs[i].trim(); } + { + // If we're building an RPM, force full debugging info to + // be generated, no matter what options have been passed + // by Ant. This is something of a kludge, but it is far + // better than the alternative, which is having class + // files with debug info mysteriously missing. + + String RpmPackageName = System.getenv("RPM_PACKAGE_NAME"); + String RpmArch = System.getenv("RPM_ARCH"); + String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT"); + if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) { + this.options.put( + CompilerOptions.OPTION_LocalVariableAttribute, + CompilerOptions.GENERATE); + this.options.put( + CompilerOptions.OPTION_LineNumberAttribute, + CompilerOptions.GENERATE); + this.options.put( + CompilerOptions.OPTION_SourceFileAttribute, + CompilerOptions.GENERATE); + } + } } argCount = newCommandLineArgs.length; this.expandedCommandLine = newCommandLineArgs;