(ddd.info)WindRiver GDB
C.1.2 Using DDD with WindRiver GDB (Tornado)
--------------------------------------------
DDD now supports WindRiver's version of GDB.(1) DDD can be integrated
into the `Launch' window by placing the `launch.tcl' script (see below)
into the the directory `~/.wind'.
Currently, DDD only supports the PowerPC and has been only tested on
a Solaris 2.6 host.
DDD launches the version of GDB that is either in the current path,
or the one specified on the command line using the `--debugger' command.
Normally, the Tornado environment is set up by sourcing a script file
which, among other things, sets up the PATH variable.
It is suggested that a soft link for the version of GDB used for the
target (i.e. `gdbppc') be made in the same directory:
bin>ls -l gdb*
39 Mar 6 16:14 gdb -> /usr/wind/host/sun4-solaris2/bin/gdbppc*
1619212 Mar 11 1997 gdbppc*
bin>_
This way DDD will start the correct version of GDB automatically.
It is also suggested that you use DDD's execution window to
facilitate parsing of GDB output. Note: Debugger Communication, for
details.
Tornado reads the default TCL scripts first, then the ones in the
users `.wind' directory. The following procedures can be cut and
pasted into the user's `launch.tcl' file:
# Launch.tcl - Launch application Tcl user customization file.
#
######
#
# setupDDD - sets up DDD for use by the launcher
#
# This routine adds the DDD to the application bar
#
# SYNOPSIS:
# setupDDD
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#
proc setupDDD {} {
# Add to the default application bar
objectCreate app ddd DDD {launchDDD}
}
######
#
# launchDDD - launch the DDD debugger
#
# SYNOPSIS:
# launchDDD
#
# PARAMETERS: N/A
#
# RETURNS: N/A
#
# ERRORS: N/A
#
proc launchDDD {} {
global tgtsvr_selected
global tgtsvr_cpuid
if {$tgtsvr_selected == "" || $tgtsvr_cpuid == 0} {
noticePost error "Select an attached target first."
return
}
set startFileName /tmp/dddstartup.[pid]
if [catch {open $startFileName w} file] {
# couldn't create a startup file. Oh, well.
exec ddd --gdb &
}
else
{
# write out a little /tmp file that attaches to the
# selected target server and then deletes itself.
puts $file "set wtx-tool-name ddd"
puts $file "target wtx $tgtsvr_selected"
puts $file "tcl exec rm $startFileName"
close $file
exec ddd --gdb --command=$startFileName &
}
}
######
#
# Launch.tcl - Initialization
#
# The user's resource file sourced from the initial Launch.tcl
#
# Add DDD to the laucher
setupDDD
In order for DDD to automatically display the source of a previously
loaded file, the entry point must be named either `vxworks_main' or
`main_vxworks'.
Note: GDB, for further configuration notes.
---------- Footnotes ----------
(1) This section was contributed by Gary Cliff from Computing
Devices Canada Ltd., <gary.cliff@cdott.com>.
automatically generated by info2www version 1.2.2.9