This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA] Add JDWP VM_INIT JVMTI callback
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: Marco Trudel <mtrudel at gmx dot ch>, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 19 Jan 2007 06:28:13 -0700
- Subject: Re: [RFA] Add JDWP VM_INIT JVMTI callback
- References: <45AC7341.40004@redhat.com> <45B00A27.5010002@gmx.ch> <45B00ADD.1030409@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
>> Please guys, remember the JNICALLs! They're not necessary for Linux
>> but at least minGW needs them...
Keith> Ugh, you know, and I really WAS being careful about that... I
Keith> double-checked that all my functions did that -- all the JVMTI ones,
Keith> at least. Sigh.
Yeah, it can be hard to remember this when developing on Linux.
Yesterday I was wondering whether there is some way we could define
JNICALL on Linux so that we would catch this error, say some harmless
attribute. But, that is probably a bad idea since JNICALL is public.
Another idea would be to use a token-pasting "DEFUN" macro and let it
do the work:
#define DEFUN(blahblah) static jvmtiError JNICALL \
_Jv_JVMTI_ ## Name blahblah
...
DEFUN(SuspendThread, (...)) { ... }
But of course this is still susceptible to the problem if you forget
to use the macro.
Tom