You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tim Ellison <t....@gmail.com> on 2007/04/28 15:36:25 UTC

[snapshot] Missing debug info in class files

When we build in release mode, the properties.xml file sets up javac to
strip the debug info from .class files (line numbers, vars, etc).  While
this may be argued for a JRE, it is clearly not useful for the JDK or
HDK builds.  We only save some JAR file space, so I suggest we disable
this 'feature' and always include debug info in class files.

Anyone agree/disagree?

Tim

Re: [snapshot] Missing debug info in class files

Posted by Tim Ellison <t....@gmail.com>.
Wayne Beaton wrote:
> I noticed that the source is included in the JRE. Is this
> necessary/desireable?

it is unnecessary if you are just running programs, and probably
undesirable to include source and debug info in a JRE -- but we don't
differentiate between a JRE build and a JDK build at the moment (only
during the packaging stage).  That's certainly a reasonable refinement.

(I'll raise a JIRA unless you beat me to it)

Regards,
Tim


RE: [snapshot] Missing debug info in class files

Posted by Wayne Beaton <wa...@eclipse.org>.
I noticed that the source is included in the JRE. Is this
necessary/desireable?

Wayne
--
Wayne Beaton
The Eclipse Foundation
wayne.beaton@eclipse.org
Skype, YIM: waynebeaton
http://www.eclipse.org
http://wbeaton.blogspot.com/
http://www.planeteclipse.org/planet/
 

> -----Original Message-----
> From: Yang Paulex [mailto:paulex.yang@gmail.com] 
> Sent: April 28, 2007 10:57 AM
> To: dev@harmony.apache.org
> Subject: Re: [snapshot] Missing debug info in class files
> 
> I have no strong feelingson JRE, but +1 to keep debug info 
> for HDK/JDK build. The debug info is very helpful
> 
> 2007/4/28, Tim Ellison <t....@gmail.com>:
> >
> > When we build in release mode, the properties.xml file sets 
> up javac 
> > to strip the debug info from .class files (line numbers, 
> vars, etc).  
> > While this may be argued for a JRE, it is clearly not 
> useful for the 
> > JDK or HDK builds.  We only save some JAR file space, so I 
> suggest we 
> > disable this 'feature' and always include debug info in class files.
> >
> > Anyone agree/disagree?
> >
> > Tim
> >
> 
> 
> 
> --
> Paulex Yang
> China Software Development laboratory
> IBM
> 


Re: [snapshot] Missing debug info in class files

Posted by Yang Paulex <pa...@gmail.com>.
I have no strong feelingson JRE, but +1 to keep debug info for HDK/JDK
build. The debug info is very helpful

2007/4/28, Tim Ellison <t....@gmail.com>:
>
> When we build in release mode, the properties.xml file sets up javac to
> strip the debug info from .class files (line numbers, vars, etc).  While
> this may be argued for a JRE, it is clearly not useful for the JDK or
> HDK builds.  We only save some JAR file space, so I suggest we disable
> this 'feature' and always include debug info in class files.
>
> Anyone agree/disagree?
>
> Tim
>



-- 
Paulex Yang
China Software Development laboratory
IBM

Re: [snapshot] Missing debug info in class files

Posted by Alexei Zakharov <al...@gmail.com>.
Well, AFAIK Sun JRE (at least 1.5.x and 1.6.x) strips debug info from
classes. This is also true for BEA JRockit *JDK* 1.5. However, Sun's
JDK 1.5 (AKA RI) includes debug symbols. So I think it is reasonable
for us to drop such info from JRE builds when probably nobody needs it
and include in JDK builds.

Regards,

2007/4/28, Tim Ellison <t....@gmail.com>:
> When we build in release mode, the properties.xml file sets up javac to
> strip the debug info from .class files (line numbers, vars, etc).  While
> this may be argued for a JRE, it is clearly not useful for the JDK or
> HDK builds.  We only save some JAR file space, so I suggest we disable
> this 'feature' and always include debug info in class files.
>
> Anyone agree/disagree?
>
> Tim
>


-- 
Alexei Zakharov,
Intel ESSD

Re: [snapshot] Missing debug info in class files

Posted by Yang Paulex <pa...@gmail.com>.
I'm not sure what's the problem, but another prior version (r533072) just
works fine, but if I install r533200 JRE as Apache VM to Eclipse, and set it
as default,  all files cannot compile, then I found that kernel.jar is not
listed in the JRE System Library. I had to add them manually. Comparing the
two versions, obviously there are three more jars in r533072's system
library - default/kernel.jar, default/gc_cc.jar and default/hythr.jar.

2007/4/29, Tim Ellison <t....@gmail.com>:
>
> Yang Paulex wrote:
> > Seems there's an issue of r533200(i.e. the M1 download) for windows,
> > kernel.jar is not included in the bootclasspath, so that the compiler
> > complain java.lang.Object cannot be resolved in Eclipse, anyone saw this
> > issue?
>
> I'm confused, if kernel.jar was not in the bootclasspath then nothing
> would run.
>
> Do you mean our javac wrapper in the JDK doesn't pick it up?
>
> Regards,
> Tim
>
>
>


-- 
Paulex Yang
China Software Development laboratory
IBM

Re: [snapshot] Missing debug info in class files

Posted by Yang Paulex <pa...@gmail.com>.
2007/4/29, Yang Paulex <pa...@gmail.com>:
>
>
>
> 2007/4/29, Yang Paulex <pa...@gmail.com>:
> >
> >
> >
> > 2007/4/29, Tim Ellison <t....@gmail.com>:
> > >
> > > Tim Ellison wrote:
> > > > Yang Paulex wrote:
> > > >> Seems there's an issue of r533200(i.e. the M1 download) for
> > > windows,
> > > >> kernel.jar is not included in the bootclasspath, so that the
> > > compiler
> > > >> complain java.lang.Object cannot be resolved in Eclipse, anyone saw
> > > this
> > > >> issue?
> > > >
> > > > I'm confused, if kernel.jar was not in the bootclasspath then
> > > nothing
> > > > would run.
> > > >
> > > > Do you mean our javac wrapper in the JDK doesn't pick it up?
> > >
> > >
> > > Oh, maybe I know what you mean ... the Eclipse plug-in support doesn't
> > > pick up the kernel JARs.  That's a simple update to the vm properties
> > > file -- and very safe (the VM and class library don't read them).
> >
> >
> > I noticed the harmonyvm.properties has been updated with three jars
> > directory added, but after copying them into r533200 build and reinstall it
> > as Eclipse JRE, the three kernel jars still didn't been loaded, anything I
> > missed?
> >
>
> Seems %VM_DIR%  isn't parsed correctly, changing it to "default" fixes the
> issue, but I guess it is not preferred to hard code it. Any ideas what
> prevenrts %VM_DIR% being recognized by Eclipse plugin?
>

Adding vm_dir:default as  default VM args in Eclipse  JRE installation page
fixed  the issue, but I think it's only a workaround, IMO the default value
should can be picked up automatically.

Regards,
> > > Tim
> > >
> >
> >
> >
> > --
> > Paulex Yang
> > China Software Development laboratory
> > IBM
> >
>
>
>
> --
> Paulex Yang
> China Software Development laboratory
> IBM
>



-- 
Paulex Yang
China Software Development laboratory
IBM

Re: [snapshot] Missing debug info in class files

Posted by Yang Paulex <pa...@gmail.com>.
2007/4/29, Yang Paulex <pa...@gmail.com>:
>
>
>
> 2007/4/29, Tim Ellison <t....@gmail.com>:
> >
> > Tim Ellison wrote:
> > > Yang Paulex wrote:
> > >> Seems there's an issue of r533200(i.e. the M1 download) for windows,
> > >> kernel.jar is not included in the bootclasspath, so that the compiler
> > >> complain java.lang.Object cannot be resolved in Eclipse, anyone saw
> > this
> > >> issue?
> > >
> > > I'm confused, if kernel.jar was not in the bootclasspath then nothing
> > > would run.
> > >
> > > Do you mean our javac wrapper in the JDK doesn't pick it up?
> >
> >
> > Oh, maybe I know what you mean ... the Eclipse plug-in support doesn't
> > pick up the kernel JARs.  That's a simple update to the vm properties
> > file -- and very safe (the VM and class library don't read them).
>
>
> I noticed the harmonyvm.properties has been updated with three jars
> directory added, but after copying them into r533200 build and reinstall it
> as Eclipse JRE, the three kernel jars still didn't been loaded, anything I
> missed?
>

Seems %VM_DIR%  isn't parsed correctly, changing it to "default" fixes the
issue, but I guess it is not preferred to hard code it. Any ideas what
prevenrts %VM_DIR% being recognized by Eclipse plugin?

Regards,
> > Tim
> >
>
>
>
> --
> Paulex Yang
> China Software Development laboratory
> IBM
>



-- 
Paulex Yang
China Software Development laboratory
IBM

Re: [snapshot] Missing debug info in class files

Posted by Yang Paulex <pa...@gmail.com>.
2007/4/29, Tim Ellison <t....@gmail.com>:
>
> Tim Ellison wrote:
> > Yang Paulex wrote:
> >> Seems there's an issue of r533200(i.e. the M1 download) for windows,
> >> kernel.jar is not included in the bootclasspath, so that the compiler
> >> complain java.lang.Object cannot be resolved in Eclipse, anyone saw
> this
> >> issue?
> >
> > I'm confused, if kernel.jar was not in the bootclasspath then nothing
> > would run.
> >
> > Do you mean our javac wrapper in the JDK doesn't pick it up?
>
>
> Oh, maybe I know what you mean ... the Eclipse plug-in support doesn't
> pick up the kernel JARs.  That's a simple update to the vm properties
> file -- and very safe (the VM and class library don't read them).


I noticed the harmonyvm.properties has been updated with three jars
directory added, but after copying them into r533200 build and reinstall it
as Eclipse JRE, the three kernel jars still didn't been loaded, anything I
missed?

Regards,
> Tim
>



-- 
Paulex Yang
China Software Development laboratory
IBM

Re: [snapshot] Missing debug info in class files

Posted by Tim Ellison <t....@gmail.com>.
Tim Ellison wrote:
> Yang Paulex wrote:
>> Seems there's an issue of r533200(i.e. the M1 download) for windows,
>> kernel.jar is not included in the bootclasspath, so that the compiler
>> complain java.lang.Object cannot be resolved in Eclipse, anyone saw this
>> issue?
> 
> I'm confused, if kernel.jar was not in the bootclasspath then nothing
> would run.
> 
> Do you mean our javac wrapper in the JDK doesn't pick it up?


Oh, maybe I know what you mean ... the Eclipse plug-in support doesn't
pick up the kernel JARs.  That's a simple update to the vm properties
file -- and very safe (the VM and class library don't read them).

Regards,
Tim

Re: [snapshot] Missing debug info in class files

Posted by Tim Ellison <t....@gmail.com>.
Yang Paulex wrote:
> Seems there's an issue of r533200(i.e. the M1 download) for windows,
> kernel.jar is not included in the bootclasspath, so that the compiler
> complain java.lang.Object cannot be resolved in Eclipse, anyone saw this
> issue?

I'm confused, if kernel.jar was not in the bootclasspath then nothing
would run.

Do you mean our javac wrapper in the JDK doesn't pick it up?

Regards,
Tim



Re: [snapshot] Missing debug info in class files

Posted by Yang Paulex <pa...@gmail.com>.
2007/4/28, Tim Ellison <t....@gmail.com>:
>
> Andrew Zhang wrote:
> > On 4/28/07, Tim Ellison <t....@gmail.com> wrote:
> >>
> >> When we build in release mode, the properties.xml file sets up javac to
> >> strip the debug info from .class files (line numbers, vars,
> etc).  While
> >> this may be argued for a JRE, it is clearly not useful for the JDK or
> >> HDK builds.  We only save some JAR file space, so I suggest we disable
> >> this 'feature' and always include debug info in class files.
> >>
> >> Anyone agree/disagree?
> >
> >
> > I agree to include debug info in JDK/HDK. It helps a lot for fixing
> bugs.
>
> I've been testing with the r533200 build and it seems good.  I think
> this oversight warrants a rebuild, of course it should not have any
> functional change but will make the JDK and HDK useful!


Seems there's an issue of r533200(i.e. the M1 download) for windows,
kernel.jar is not included in the bootclasspath, so that the compiler
complain java.lang.Object cannot be resolved in Eclipse, anyone saw this
issue?

I'll hack the script to always include debug info -- we can take it out
> for the JRE at a later stable build.
>
> Regards,
> Tim
>



-- 
Paulex Yang
China Software Development laboratory
IBM

Re: [snapshot] Missing debug info in class files

Posted by Tim Ellison <t....@gmail.com>.
Andrew Zhang wrote:
> On 4/28/07, Tim Ellison <t....@gmail.com> wrote:
>>
>> When we build in release mode, the properties.xml file sets up javac to
>> strip the debug info from .class files (line numbers, vars, etc).  While
>> this may be argued for a JRE, it is clearly not useful for the JDK or
>> HDK builds.  We only save some JAR file space, so I suggest we disable
>> this 'feature' and always include debug info in class files.
>>
>> Anyone agree/disagree?
> 
> 
> I agree to include debug info in JDK/HDK. It helps a lot for fixing bugs.

I've been testing with the r533200 build and it seems good.  I think
this oversight warrants a rebuild, of course it should not have any
functional change but will make the JDK and HDK useful!

I'll hack the script to always include debug info -- we can take it out
for the JRE at a later stable build.

Regards,
Tim

Re: [snapshot] Missing debug info in class files

Posted by Andrew Zhang <zh...@gmail.com>.
On 4/28/07, Tim Ellison <t....@gmail.com> wrote:
>
> When we build in release mode, the properties.xml file sets up javac to
> strip the debug info from .class files (line numbers, vars, etc).  While
> this may be argued for a JRE, it is clearly not useful for the JDK or
> HDK builds.  We only save some JAR file space, so I suggest we disable
> this 'feature' and always include debug info in class files.
>
> Anyone agree/disagree?


I agree to include debug info in JDK/HDK. It helps a lot for fixing bugs.

Tim
>



-- 
Best regards,
Andrew Zhang