24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UM-400 16 - C Debug<br />

Introduction<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong><br />

C Debug allows you to interactively debug FLI/PLI/VPI/SystemC C/C++ source code with<br />

the open-source gdb debugger. Even though C Debug doesn’t provide access to all gdb<br />

features, you may wish to read gdb documentation for additional information.<br />

Please be aware of the following caveats before using C Debug:<br />

C Debug is an interface to the open-source gdb debugger. We have not customized gdb<br />

source code, <strong>and</strong> C Debug doesn’t remove any of the limitations or bugs of gdb.<br />

We assume that you are competent with C or C++ coding <strong>and</strong> C debugging in general.<br />

Recommended usage is that you invoke C Debug once for a given simulation <strong>and</strong> then<br />

quit both C Debug <strong>and</strong> <strong>ModelSim</strong>. Starting <strong>and</strong> stopping C Debug more than once during<br />

a single simulation session may cause problems for gdb.<br />

The gdb debugger has a known bug that makes it impossible to set breakpoints reliably<br />

in constructors or destructors. Be careful while stepping through code which may end up<br />

calling constructors of SystemC objects; it may crash the debugger.<br />

Generally you should not have an existing .gdbinit file. If you do, make certain you<br />

haven’t done any of the following: defined your own comm<strong>and</strong>s or renamed existing<br />

comm<strong>and</strong>s; used 'set annotate...', 'set height...', 'set width...', or 'set print...'; set<br />

breakpoints or watchpoints.<br />

To use C Debug on Windows platforms, you must compile your source code with gcc/<br />

g++. See "Running C Debug on Windows platforms" (UM-401) below.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!