Using DDD with GDB

Some GDB settings are essential for DDD to work correctly. These settings with their correct values are:

     set height 0
     set width 0
     set verbose off
     set annotate 1
     set prompt (gdb)
     

DDD sets these values automatically when invoking GDB; if these values are changed, there may be some malfunctions, especially in the data display.

When debugging at the machine level with GDB 4.12 and earlier as inferior debugger, use a display /x $pc command to ensure the program counter value is updated correctly at each stop. You may also enter the command in ~/.gdbinit or (better yet) upgrade to the most recent GDB version.

  • WDB: Using DDD with WDB
  • WindRiver GDB: Using DDD with WindRiver GDB (Tornado)

Node:WDB, Next:WindRiver GDB, Up:GDB

Using DDD with WDB

HP's WildeBeest (WDB) is essentially a variant of GDB. To start DDD with WDB as inferior debugger, use

     ddd --wdb 

**Illegal HTML tag removed :** program

     

See GDB, for further configuration notes.

Node:WindRiver GDB, Previous:WDB, Up:GDB

Using DDD with WindRiver GDB (Tornado)

DDD now supports WindRiver's version of GDB.34 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>

**Illegal HTML tag removed :** 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. See 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.

See GDB, for further configuration notes.

Node:DBX, Next:Ladebug, Previous:GDB, Up:Configuration Notes

results matching ""

    No results matching ""