Re: Question about debugging .class file



Thanks Tom,


Thomas Hawtin wrote:
>> When debugging a C or C++ binary file, the file is different from the release
>> version of binary file (debug version binary file is larger). My question is,
>[quoted text clipped - 3 lines]
>> order to make debug version binary file be different from release version
>> binary file?
>
>http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#options
>
>You can strip the debug information with -g:none. -O used to do the same
>thing, but that appears to be gone.
>
>It shouldn't make much difference to the performance if you leave
>debugging information in. Line numbers in particular can be handy to
>diagnose errors on production systems.
>
>If you want to hide your code from decompilation, best use and
>obfuscator. There's lots of information left in the light compilation
>from source to byte code. Type names, field names, method names and most
>of the structure.
>
>http://mindprod.com/jgloss/obfuscator.html
>http://mindprod.com/jgloss/decompiler.html
>
>The real question: is size important to you. For both ye olde C++ on a
>floppy and Java applet I have come into a company and shrunk the binary
>considerably by switching off the default debug info. But if you're
>shipping to your own servers, on DVD or over broadband, size matters not.
>
>Tom Hawtin

Suppose we want to debug a .class file, we will compile it into debug status
(so that we can use F6, F7 and F8 in Java IDE to debug .class file). Do you
mean the .class file (which we use to debug as mentioned above) is different
from (larger than) the file which we are going to release?

What do you mean "light compilation from source to byte code"?


regards,
George


--
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200508/1
.



Relevant Pages

  • Re: Question about debugging .class file
    ... George George via JavaKB.com wrote: ... version of binary file. ... My question is, if we want to debug a Java binary file, is the version of file the same as the file? ... For both ye olde C++ on a floppy and Java applet I have come into a company and shrunk the binary considerably by switching off the default debug info. ...
    (comp.lang.java.help)
  • Re: Question about debugging .class file
    ... >version binary file is always different from release version ... it will strip the debug stuff. ... library code bound into the class file. ... http://mindprod.com Again taking new Java programming contracts. ...
    (comp.lang.java.help)
  • [PATCH 4/4] ide-disk: fix issues found by checkpatch.pl
    ... There are no changes to the resulting drivers/ide/ide-disk.o binary file ... -//#define DEBUG ... static int proc_idedisk_read_capacity ... ide_task_t args; ...
    (Linux-Kernel)
  • Re: Question about debugging .class file
    ... >version of binary file (debug version binary file is larger). ... The main choice is whether to use Java.exe in the JRE or the JDK. ... one in the JDK has extra debugging turned on. ...
    (comp.lang.java.help)
  • Re: Question about debugging .class file
    ... >>version of binary file (debug version binary file is larger). ... >The main choice is whether to use Java.exe in the JRE or the JDK. ... So, no matter what methods are used, the debug ...
    (comp.lang.java.help)