USER’S MANUAL__________________________________________________________________
406 _________________________________________________________________ M211322EN-D
D.3.5 Using ddd on the Main & Proc Code
The GNU ddd symbolic debugger is (usually) built on top of the dde
command line debugger. Both are mature and well-crafted tools that are
provided on all Linux systems.
Code that you write for the RVP8/Main threads can be debugged using:
$ cd /home/operator/src/rda/rvp8main
$ make –j2
$ cd open
$ ddd rvp8
The SITE and OPEN code is first compiled in the private development
tree, and then we run the RVP8 executable that resides in the OPEN area.
You may want to redefine the environment variable "OPTIMIZEFLAG=–
g" that is, remove the "-O2" that is normally there. This causes the
Makefiles to build non-optimized code, which generally behaves more
smoothly in a symbolic debugger.
You can type "run" in the ddd execution window, but you may prefer to
use "run –nod" to skip the powerup diagnostics and speed up your
development cycle. Typing "b main" ahead of time causes ddd to break on
the first executable line after all of the dynamic library references have
been resolved. This is a good way to get started, because you may break on
any entry point within the RVP8. Before the libraries are loaded, it is
possible that ddd may not be able to find all of its symbols.
Debugging the RVP8/Proc code is similar, except that we do not want it to
automatically start from the main threads. Therefore, in one X-Term
window type:
$ rvp8 –noFork
which starts up the RVP8/Main threads, but pauses at the point that the
RVP8/Proc process would normally be created. The -noFork forces the
subprocess count to one, as if you had included -procs 1 on the original
command line.
NOTE
When the RVP8/Main is debugged in the above manner, signal events
originating from ddd are also sent to the RVP8/Proc child threads. They
are likely to cause them to behave improperly. Use this technique only for
quick ventures into the main threads, and preferably with -procs 0.