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.

Stepping in C Debug<br />

Stepping in C Debug UM-405<br />

Stepping in C Debug works much like you would expect. You use the same buttons <strong>and</strong><br />

comm<strong>and</strong>s that you use when working with an HDL-only design.<br />

Button Menu equivalent Other equivalents<br />

Step<br />

steps the current simulation to<br />

the next statement; if the next<br />

statement is a call to a C function<br />

that was compiled with debug<br />

info, <strong>ModelSim</strong> will step into the<br />

function<br />

Step Over<br />

statements are executed but<br />

treated as simple statements<br />

instead of entered <strong>and</strong> traced<br />

line-by-line; C functions are not<br />

stepped into unless you have an<br />

enabled breakpoint in the C file<br />

Continue Run<br />

continue the current simulation<br />

run until the end of the specified<br />

run length or until it hits a<br />

breakpoint or specified break<br />

event<br />

Known problems with stepping in C Debug<br />

Tools > C Debug > Run<br />

> Step<br />

Tools > C Debug > Run<br />

> Step -Over<br />

Tools > C Debug > Run<br />

> Continue<br />

use the step comm<strong>and</strong> at the<br />

CDBG> prompt<br />

see: step (CR-272) comm<strong>and</strong><br />

use the step -over comm<strong>and</strong> at the<br />

CDBG> prompt<br />

see: step (CR-272) comm<strong>and</strong><br />

use the run -continue comm<strong>and</strong> at<br />

the CDBG> prompt<br />

see: run (CR-252)<br />

The following are known limitations which relate to problems with 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 />

With some platform <strong>and</strong> compiler versions, step may actually behave like run -continue<br />

when in a C file. This is a gdb quirk that results from not having any debugging<br />

information when in an internal function to VSIM (i.e., any FLI or VPI function). In these<br />

situations, use step -over to move line-by-line.<br />

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

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

Saved successfully!

Ooh no, something went wrong!