fsize field in Hjava_lang_Class?

Godmar Back gback at cs.utah.edu
Mon May 18 15:52:33 PDT 1998

> I tried turning on ADBG output in kaffevm/soft.c, and the one in soft.new has 
> a problem:
> ADBG(printf("New object of type %s (%d,%x)\n", c->name->data, c->fsize, obj);
> fsize field of the Hjava_lang_Class struct does not exist. I believe this 
> should be 'bfsize' (or maybe call to CLASS_FSIZE macro)?

 That's likely. (The CLASS_FSIZE macro does just that)
The fact that is doesn't compile means that the debug hasn't been turned on
since the name of the field was changed from fsize to bfsize...

> And speaking of ADBG's, is there a way to turn on debugging output 
> automatically or do I have to fix their define's in every file I'm interested 
> in? I couldn't find any switches in configure file. And what is the division 
> of labour among [ACIMT]DBG's supposed to be?

No, there isn't.  The debug defines in Kaffe are rather chaotic and don't
follow any principles.

Here at Utah, Pat Tullmann added a debug framework that allows the specification
of debug options on the command line.  So for instance, you could say

if you wanted to enable to GC_DEBUG and GC_ALLOC_DEBUG options.  There
are also "catch all options", like GC_DEBUG_ALL, which enable all GC
related debugging options.

The debug macros have been changed, they look something like:

	DEBUG(GC_DEBUG, "allocated object of size %x\n", o)

It is still possible to compile these macros out, similar to asserts.

If there is interest, he and I could check this debug framework in the current
Kaffe tree.  However, I would like to hear from others, especially from Tim,
if they would approve of/like that, given that it would involve changing a 
large line count of code.

	- Godmar

More information about the kaffe mailing list