[K42-discussion] destruction of global kernel objects
Bryan S Rosenburg
rosnbrg at us.ibm.com
Thu Sep 21 08:26:19 EST 2006
Donour Sizemore wrote on 09/20/2006 06:01:07 PM:
> Reading between the lines, it seems like you're saying that these
> classes shouldn't have destructors and I agree. GCC doesn't.
No. I'm saying that if XBaseObj has to have a virtual destructor, the
stub-generator had better take it into account when it figures out what
method numbers correspond to what actual methods. I'm guessing that the
reason you're seeing the destructor invoked is that some
protected-procedure-call client is passing a method number that it thinks
corresponds to method foo() in the target XObj and instead corresponds to
the destructor.
I assume you've done a full clean and rebuild. Doing things that change
method numbers in stub-generated code SHOULD get picked up by the
Makefiles, but I don't trust the dependencies. Make sure all the
stub-generated code is re-generated.
Assuming that's not the problem, you will have to look at the intermediate
files the stub-generator spits out. One of them is just a skeleton class
with all the exported methods. It's compiled only for the sake of
determining method numbers. I'm not sure whether that generated class
inherits from XBaseObj or not. If it doesn't, you'll have to make the
generated class match your XBaseObj in order to get the method numbers to
be correct.
- Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/k42-discussion/attachments/20060920/4819b3b6/attachment.htm
More information about the K42-discussion
mailing list