| Here are some ideas for helping you debug the simulator.
- Build the program with CFLAGS=-g and CXXFLAGS=-g.
- It doesn't matter whether you build with shared libraries or without.
- Generate and keep a sid configuration file that you want to use.
The "--no-run" option for the FOO-sid scripts can help.
- Don't move the simulator install/build/source trees, to help the
debugger find all the various parts.
- Start the simulator under a debugger like gdb. Specify the sid command line
arguments, such as the configuration file name.
- Put a breakpoint on the function "sid_post_configure", a hook function
in sid/main/dynamic/mainDynamic.cxx called just after configuration has completed.
- Resume sid. By the time the breakpoint is hit, all the component libraries
that are used by the given configuration will be loaded and available.
- When trying to set other breakpoints in the program, it may be simpler to
use source file / line number syntax (e.g., "file.cxx:34"). That is because
referring to the C++ identifiers may be difficult because of namespace/class
scopes and overloading. In gdb, use the single-quoted interactive completion
facility, e.g.,:
'arm::arm_cpu::step_insn TAB
|