If you have connected to the VxWorks target and you want to debug an
object that has not yet been loaded, you can use the GDB
load
command to download a file from Unix to VxWorks
incrementally. The object file given as an argument to the load
command is actually opened twice: first by the VxWorks target in order
to download the code, then by GDB in order to read the symbol
table. This can lead to problems if the current working directories on
the two systems differ. If both systems have NFS mounted the same
filesystems, you can avoid these problems by using absolute paths.
Otherwise, it is simplest to set the working directory on both systems
to the directory in which the object file resides, and then to reference
the file by its name, without any path. For instance, a program
`prog.o' may reside in `vxpath/vw/demo/rdb' in VxWorks
and in `hostpath/vw/demo/rdb' on the host. To load this
program, type this on VxWorks:
-> cd "vxpath/vw/demo/rdb"
Then, in GDB, type:
(vxgdb) cd hostpath/vw/demo/rdb (vxgdb) load prog.o
GDB displays a response similar to this:
Reading symbol data from wherever/vw/demo/rdb/prog.o... done.
You can also use the load
command to reload an object module
after editing and recompiling the corresponding source file. Note that
this makes GDB delete all currently-defined breakpoints,
auto-displays, and convenience variables, and to clear the value
history. (This is necessary in order to preserve the integrity of
debugger's data structures that reference the target system's symbol
table.)
Go to the first, previous, next, last section, table of contents.