Extending Debug Eclipse Functionality

I need to create an Eclipse debugger plugin that can debug embedded code that runs on the Cortex-M0 core. My plugin depends on the existing plugin for debugging applications: GNU ARM Eclipse JLink plugin ( http://gnuarmeclipse.livius.net/blog/ ) My debugger plugin should be able to send information (for example, src code line, file, etc. ) In a Java application when a breakpoint is reached and when the user presses the resume and pause buttons.

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

I managed to create a Launch Delegate that extends the GNU ARM plug-in JLink LaunchConfigurationDelegate, so I don't need to rewrite the code that initializes the debugging environment.

From the GNU ARM Eclipse JLink plugin src code, I understand that it does not extend the functionality of Eclipse by default when a breakpoint is hit, or the user clicks the "resume" button, comes, etc. Therefore, I do not have an existing jlink plugin class. In my debugging 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 and org.eclipse.debug.core.model.IStep, I could catch interrupt hit events and step events. But still, I can’t catch any debugging events in my plugin code.

Do you have any hints on how to catch debug events in my plugin (pause, resume, log in, go, etc.) from the Eclipse user interface? Could you tell me which classes should be extended or which interfaces should be implemented in order to catch code step events?

+4
source share
1 answer

DsfServiceEventHandler helped me. Now I can catch the MIBreakpointHitEvent events and get the file name, function name and src line of breakpoint code.

0
source

All Articles