Possible to associate CCES breakpoints with a symbol rather than a source code line number?

We're exploring the possibility of using the CCES debugger as part of our smoke test suite to confirm that we're always hitting certain functions in the normal operation of our application. This would work by using the CCES breakpoint mechanism to log the fact that a breakpoint has been hit and then automatically continue.

One difficulty we've run up against is that the XML (.bkpt) file which can be used to export and import breakpoints stores them as line numbers within a source file as shown below:

<breakpoint enabled="false" persistant="true" registered="true">
<resource path="/application/src/AdcCallbacks.c" type="1"/>
<marker lineNumber="157" type="org.eclipse.cdt.debug.core.cLineBreakpointMarker">
<attrib name="org.eclipse.cdt.debug.core.breakpointType" value="0"/>
<attrib name="com.analog.crosscore.debug.procId" value="0"/>
<attrib name="org.eclipse.cdt.debug.core.ignoreCount" value="0"/>
<attrib name="org.eclipse.debug.core.enabled" value="false"/>
<attrib name="message" value="Line breakpoint (relocated): AdcCallbacks.c [line: 157]"/>
<attrib name="org.eclipse.debug.core.id" value="org.eclipse.cdt.debug.core"/>
<attrib name="org.eclipse.cdt.debug.core.condition" value=""/>
<attrib name="org.eclipse.cdt.debug.core.sourceHandle" value="C:\Users\ShanksCa\Desktop\repository\application\src\AdcCallbacks.c"/>
<attrib name="workingset_name" value=""/>
<attrib name="workingset_id" value="org.eclipse.debug.ui.breakpointWorkingSet"/>

Adding or deleting lines from the source file will have the undesirable side effect of shifting breakpoints on lines that follow the addition or deletion.

Is it possible to save or export breakpoints in a way that associates breakpoints with linkage symbols instead of line numbers? We're using CCES 2.8.3.


-David Shanks

  • 0
    •  Analog Employees 
    on Jan 9, 2020 10:56 AM

    Hello Davis,

    Our sincere apologize for the delayed response

    To add a breakpoint at a function in CCES, please follow the below procedure to save or export breakpoints in a way that associates breakpoints with linkage symbols instead of line numbers:

    1. Open the project in CCES IDE and build the project.
    2. In the C/C++ perspective, in the outline view, right-click the function you want to add breakpoint (e.g. add_ten) and select “Toggle Breakpoint”, a red dot will add behind the function in the editor.(refer screenshot breakpoint.jpg)
    3.Launch a debug configuration with CrossCore Debugger and run the project.You can see the breakpoint hitting on the function add_ten as expected.(refer screenshot debug.jpg)

    Please let us know if you need any further assistance.

    Santha kumari.K