JVMDI Launching and Thread Suspension
Hi,
I am using JVMDI to debug a java application. I launch the application and debugger with the following command line.
java -Xdebug -Xnoagent -XrunTest:ADA <applicationName>
When I try and suspend the application after a method entry event, everything (including my JVMDI debugger) is suspended. This is not what I had thought would happen. I only want the application thread to suspend so that I can access the stack frames. Is there a problem with the way I am loading the application and debugger ?or am I suspending that application incorrectly (see below).
err = jvmdi->GetMethodLocation((*event).u.frame.clazz,
(*event).u.frame.method,
&startLocationPtr, &endLocationPtr);
err = jvmdi->GetMethodName((*event).u.frame.clazz,
(*event).u.frame.method,
&namePtr, &signaturePtr);
err = jvmdi->GetSourceFileName((*event).u.frame.clazz,&SourceNamePtr);
/* is this the application class or a system class */
if ((strncmp(prefix,SourceNamePtr,prefixLength) == 0))
{
err = jvmdi->SuspendThread((*event).u.frame.thread);
}
Any help would be greatly appreciated.
Chief

