4.14 DEBUGGING TOOLS
4.14.1 LCU debugging, VxGDB, VxWorks source code debugger
· compile it without the keywords OPTIMIZE and NOOPTIMIZE (debug option) defined in your makefile and install it in INTROOT, see also man pages of vltMake
· type
target vxworks <lcunode> or ta vxw <lcunode>
vxgdb shall display in the command window for each module it finds debug symbols:
<mod>: OK
To debug routines running as functions under a command interpreter, do the following:
· compile the function with debug option set. There is no need to compile the command interpreter with debug option set.
· attach VxGDB to the command interpreter (type
attach 0xyyyyyy
where yyyyyy is the task id, i.e. what you get when you type the command i from the VxWorks shell, of the command interpreter)
· send the command to run the function. The command interpreter now stops at the breakpoint. You can continue debugging.
To debug tasks not yet started, e.g. tasks running under the command interpreter, do the following:
· compile the task with debug option set. There is no need to compile the command
interpreter with debug option set.
· set a breakpoint in your task with the low-level debugger from the VxWorks shell, e.g. type
b entryPoint
where entryPoint is the entry point of your task
· send the command to execute the task. When the task has started and has been trapped by the low-level debugger, attach VxGDB to the task, see above. From now on you can continue debugging with VxGDB.
4.14.2 WS debugging, gdb
gdb can be used together with emacs to provide somewhat more comfort than the pure gdb one window line mode debugger does.
To start it start emacs in the bin directory of the module you want to debug. Press F11 and enter the name of the program to debug. This will start gdb. Set a breakpoint and run your program. Two windows will be opened, one with the source listing and one gdb command window.
Due to the use of shared libraries, it is not possible, and usually not necessary, to debug the CCS code. However, if really desired, an archive version of the CCS library is available. The executable should be generated again, setting the appropriate flag for the Makefile:
- either defining MAKE_NOSHARED for the whole module,
or for each executable in the makefile, define progxx_NOSHARED = on
Quadralay Corporation http://www.webworks.com Voice: (512) 719-3399 Fax: (512) 719-3606 sales@webworks.com |