This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] JVMTI Agent Loading


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]