This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch to emit debug into emitted classes


On 10-Mar-05, at 7:43 PM, Daniel Jacobowitz wrote:

On Thu, Mar 10, 2005 at 03:56:27PM -0800, Per Bothner wrote:
Daniel Jacobowitz wrote:
So does it still help so much?

I think so, but I'll have to re-compile the library.


I did try a simple hello world:
-rw-rw-r--  1 bothner bothner 56053 Mar 10 15:33 Foo1.s # before
-rw-rw-r--  1 bothner bothner 12607 Mar 10 15:39 Foo2.s # after

Is the resulting debug information useful?

Why not? Of course it needs to be tested, but the mechanism works for C++,
and has been used by gcc/gdb for many years.

I know the principle is sound, although it's less "obvious" than you're making it sound - for instance, the user is SOL if a Java library lacks debugging info. I was asking about the Java-specific bits, i.e. whether the resulting set of output classes is appropriate. I'll just take your word for it; I barely even speak Java.


In principle, the Java type data in the debug info is redundant anyway - gdb could, in theory, get all the info it needs from GCJ's metadata. In fact, with the BC-ABI it needs to do this to be correct: the type layouts can change at runtime, so the debug info is not only redundant but wrong!

So, I don't think libraries lacking debugging info would be a significant problem, and it looks like the size savings are awesome.

Per: I'll try and test this tomorrow.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]