Table of Contents Previous page Next page Index

ModelSim

Model Technology Inc.


Debugging FLI application code

In order to debug your FLI application code in a debugger (for example, gdb or ddd), your application code must be compiled with debugging information (for example, by using the -g option). You must then load vsim into a debugger (for example, ddd vsim). Even though vsim is stripped, most debuggers will still execute it.

Since initially the debugger recognizes only vsim's FLI function symbols, you need to place a breakpoint in the first FLI function that is called by your application code. An easy way to set an entry point is to put a call to mti_GetProductVersion() as the first executable statement in your application code. Then, after vsim has been loaded into the debugger, set a breakpoint in this function.

Once you have set the breakpoint, run vsim with the usual arguments (for example, run -c top). When the breakpoint is reached, the shared library containing your application code has been loaded. (In some debuggers you must use the "share" command to load the FLI application's symbols.) At this point all of the FLI application's symbols should be visible. You can now set breakpoints in and single step through your FLI application code.



Model Technology Inc.
Voice: (503) 641-1340
Fax: (503)526-5410
http://www.model.com
sales@model.com
TOC PREV NEXT INDEX

ModelSim