Interfaces
Jason Baker
jbaker at cs.utah.edu
Mon Feb 7 11:32:26 PST 2000
Derek L Davies <ddavies at world.std.com> writes:
> I wonder why the JVMDI call isn't done like this:
>
> (*jvmdi)->SetEventHook(jvmdi, &evtFtn);
They must have decided it was too annoying.
> so that the benefits of having an interface pointer are realized for
> JVMDI as they are for JNIEnv and JavaVM? Briefly, the benefits as I
> understand them are: COM compatibility, C++ compatitbility, lack of
> dependancy on vendor specific library name, Multiple implementations
> of an interface, and interface versioning.
I thought the benfit was that JNIEnv becomes a second return value:
A jni call produces a new JNIEnv along with either the return value or
an error condition. But vmdi is different: there is exactly one
JVMDI_Interface_1, which you can save a pointer to.
>
> It seems like the "codeguru" example is broken to me. Does anyone
> know if this is a legal example? I don't have sun's implementation
> and am going to great lengths to avoid getting it. I don't want to
> look at any of their code, including their implementation of
> "jvmdi.h". Does anyone have an example of calling a JVMDI function
> that works with the sun code?
Yes.
Jason
More information about the kaffe
mailing list