User`s manual

Source-Level Debugging in C
Motorola Debugging C and Assembly Code 3-17
3.2.10 Casting in a C Program
Suite56 tools support these kinds of casts for both basic C types and user-defined types
(i.e., those defined by
typedef):
(type)
(type *)
(enum enumeration_tag)
(enum enumeration_tag *)
(struct structure_tag *)
(union union_tag *)
3.2.11 Tracing in a C Program
Suite56 tools offer tracing so you can continuously see the values in any registers or
memory locations that interest you as your program executes. Before you begin tracing,
you indicate whether you want to trace by execution cycles, by lines of C code, or by
assembled instructions. You also indicate how many cycles, lines, or instructions you
want to trace and whether to halt execution for breakpoints.
To trace in the graphic user interface, from the Execute menu, choose
Trace. A dialogue box appears for you to indicate cycles, lines, or
instructions, how many, and whether to halt at breakpoints.
To trace in the text-based interface, type the
trace command with
options and parameters to indicate how you want the trace to proceed.
Use the Next button on the toolbar to skip over subroutine calls and step through
execution routine by routine. In other words, the Next button recognizes which
assembly instructions make up a C routine, effectively executes each routine to
completion, and then steps from that executed routine to the first instruction of the next
routine. (See Section 3.3.2, "Tracing Assembly Code," on page 3-23, for suggestions
about stepping through code instruction by instruction.)
3.2.12 Using C-Specific Commands
As you have seen, the debugging commands in Suite56 tools are available to you through
menu items in the graphic user interface and as commands to enter in the Command
window. Most of the debugging commands available through Suite56 tools—
break,
evaluate, finish, go, next, step, trace, until, watch—apply to both C
programs and assembly programs. There are a few commands specific to C programs,
however.