This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA] JVMTI Agent Loading
- From: Tom Tromey <tromey at redhat dot com>
- To: Kyle Galloway <kgallowa at redhat dot com>
- Cc: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: 30 Mar 2007 14:22:35 -0600
- Subject: Re: [RFA] JVMTI Agent Loading
- References: <460AC972.5080101@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:
Kyle> 2007-03-28 Kyle Galloway <kgallowa@redhat.com>
Kyle> * gij.cc (main): Accept -agentlib and -agentpath options.
Kyle> * prims.cc (parse_init_args): Deal with -agentlib and -agentpath.
Kyle> (load_jvmti_agent) New function.
Kyle> Questions/comments/concerns?
Just a few random nits.
Kyle> +// Typedefs for JVMTI agent functions
Kyle> +typedef jint (*jvmti_agent_onload_func) (JavaVM *vm, char *options, void *reserved);
This is > 79 columns, so there should be a break after the last ",".
Kyle> + // if the unmangled name fails, try the mangled name
Weird... do we really need this?
Some of the formatting in this function looks wacky but I didn't look
to see if that is just due to the patch format. Just double-check it.
Kyle> +// If LTDL cannot be used, return an error code indicating this
Kyle> +return -99;
This isn't indented.
Kyle> + else if (! strncmp (option_string, "-agentlib", sizeof ("-agentlib") - 1))
Kyle> + {
Kyle> + char *strPtr;
Kyle> +
Kyle> + if (strlen(option_string) > 10)
Kyle> + strPtr = &option_string[10];
Instead of 10, maybe sizeof("-agentlib")?
Tom