Setting a Breakpoint for the Imported Function - 2024.1 English

Vitis Model Composer User Guide (UG1483)

Document ID
Release Date
2024.1 English

When the debugger is launched, you can set a breakpoint for the C/C++ imported function in the current model. This will break, or pause the Simulink simulation at the point it enters the imported function. This lets you perform further debugging actions, such as stepping through the function, printing variable values, or listing lines of code. Refer to the documentation for your debugging tool for more information on specific commands, and debugging techniques.

Tip: The following commands are provided for GDB, as it is the default debugger for Model Composer.
Setting a breakpoint uses the function name of the imported function:
(gdb) break <function_name>

Because simulation has not yet started, GDB will respond that no symbol table is loaded, and indicate that you can use the "file" command to specify break points. This simply means that you can also specify breakpoints based on the source file for the imported C/C++ function, and line number, specified as follows:

(gdb) break <file name>:<line num>

For example: break func3_d.h:10

Important: Blocks created from function templates, as described in Defining Blocks Using Function Templates, require the file name and line number to set breakpoints.