[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jdt-debug-dev] Common Questions about functionality in jdt.debug.core
|
Thank you Jared. It certainly something I think I should be aware of.
Jared Burns wrote:
Take a look at JavaMethodBreakpoint#handleMethodEvent(...). You'll
notice that our method breakpoints don't map directly to the JDI notion
of a method breakpoint.
In JDWP, you set a method breakpoint on a type and it is hit anytime any
method on that class is run. Our JavaMethodBreakpoints (which you can
think of as wrappering the JDI requests) are set on a per-type,
per-method basis. We still get the JDI events whenever a method is
entered/exited, but our implementation filters the events to the method
that's interesting. You'll only get breakpointHit notifications for
methods that make it through this filtering process.
I know that doesn't answer all your questions, but hopefully it will
help you move forward.
- Jared
Joe Tague wrote:
Sorry to post here but I have had no luck in the newsgroups.
I am creating a plugin for my final year project that identifies
design patterns from static structure and dynamic execution traces.
For this my plugin has been creating MethodEntryBreakpoints, and
Watchpoints.
I create breakpoints by using the factories supplied by JDIDebugModel.
For example:
IJavaMethodEntryBreakpoint br =
JDIDebugModel.createMethodEntryBreakpoint(..
IJavaWatchpoint wp = JDIDebugModel.createWatchpoint(..
I am also able to launch in DEBUG_MODE.
I have a JavaBreakpointListener class that implements the
breakpointHit() and installingBreakpoint() methods. In the former I
just print some execution information out to the console (for now) and
the latter I just return IJavaBreakpointListener.INSTALL;
In the breakpointHit() method I always return a
IJavaBreakpointListener.DONT_SUSPEND vote so I can trace what and when
methods are hit in the program execution, without suspending the VM.
For some reason LineBreakpoints and Watchpoints show as hitting the
breakpointHit() method of my listener however MethodBreakpoints do not.
When I check the .isInstalled() property for my breakpoints, it shows
them as not installed - which seems fine for everything but
MethodBreakpoints.
At no point do I directly add breakpoints to a BreakpointManager, as
from various posting it seemed that to make sure my breakpoint do not
suspend the VM I should create them invisibly i.e do not register them
with a BreakpointManager.
Can anyone suggest where I am going wrong?
Plus how do I gain access to objects of the type JavaValue,
JavaVariable, JavaClassObject, JavaClassType etc. I need to do some
decisions based on whether certain fields have been accessed, added to
etc to identify the dynamic behaviour of a design pattern.
I know this is a lot to ask, and possibly the wrong place to ask it,
but I cannot find any examples for these points anywhere. I have been
backwards and forwards through the jdt.debug.* plugins.
Thanks for your time.
Joe
_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-debug-dev
_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-debug-dev