HP 68000 Series User Manual page 96

Debugger/simulator
Table of Contents

Advertisement

Chapter 3: Loading and Executing Programs
Compiling Programs for the Debugger
The "Environment Dependent Routines" chapter of the Motorola 68000
Family C Cross Compiler User's Guide describes the environment dependent
routines supplied with the compiler.
Using Optimizing Modes
If you use the optimizing modes (–O or –OT), function calls that do not have
automatic variables may not have stack frames. As a result, the stack
backtrace window will not contain entries for such functions. Additionally, the
optimizing modes will cause the compiler to generate code which is not easily
debugged.
Note
When initially compiling a program for the debugger, you should turn off all
optimizations to avoid confusion when using the debugger. After program
flow and all basic algorithms have been debugged, you can recompile the
program with all optimizations turned on.
When you compile with all optimizations on, one or more of the following
problems may occur while using the debugger:
Forcing Variables to be Placed in Memory
The default compiler settings automatically create register variables for statics
and frequently used variables. Some debugger functions such as access
breakpoints will not work with register variables. The compiler option -Wc, -F
turns off the compiler's automatic creation of register variables, forcing the
compiler to assign these variables to memory. This enables greater
functionality of some debugger commands. After debugging your code, you
can then recompile your code without these options for greater efficiency.
74
Target program execution in the debugger may not appear to correctly
reflect the logical flow of the program.
The debugger may not stop execution at a high-level breakpoint or may
stop execution at the wrong location in the program.
The debugger may not be able to display local variables.

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents