5

I need to create an Eclipse Debugger Plugin that is able to debug embedded code, running at a Cortex-M0 core. My plugin depends on an existing plugin for debugging arm applications: GNU ARM Eclipse JLink plugin (http://gnuarmeclipse.livius.net/blog/) My debugger plugin should be able to send information (like src code line, file etc) to a java application when a breakpoint is hit and when the user presses resume and suspend button.

According to https://www.eclipse.org/articles/Article-Debugger/how-to.html , I have to implement my own Eclipse Debug Model

I have managed to create a Launch Delegate that extends GNU ARM JLink plugin LaunchConfigurationDelegate class, so that I do not have to rewrite the code that initializes the debug environment.

From the GNU ARM Eclipse JLink plugin src code, I understand that it does not extend the default functionality of Eclipse when a breakpoint is hit or the user presses resume,step into etc. So I do not have an existing jlink plugin class to extend. In my debug model I created classes that implement IDebugTarget, IStackFrame, IThread and extend DebugElement among others. I thought that by implementing classes from org.eclipse.debug.core.model.ISuspendResume & org.eclipse.debug.core.model.IStep I would be able to catch breakpoint hit events and stepping events. But still, I can not catch any debug events in my plugin code.

Do you have any hints on how to catch debug events in my plugin (suspend,resume,step into,step over etc) from the Eclipse UI? Could you inform me which classes should I extend or which interfaces should I implement in order to catch code stepping events?

0

1 Answer 1

1

DsfServiceEventHandler helped me. I am now able to catch MIBreakpointHitEvent events and retrieve file name, function name and src code line of the breakpoint.

Sign up to request clarification or add additional context in comments.

1 Comment

Can you please post a sample code how to use DsfServiceEventHandler and MIBreakpointHitEvent to catch the breakpoint hits? Can these be used to read values of a variable? If not which class should be used for that? Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.