next up previous contents
Next: About this document ... Up: GDB Agent for RTEMS Previous: RTEMS Specific GDB Commands   Contents

Example Session

Assume you compiled a module in your home directory
		cross-gcc -g -c blah.c -o /home/john/blah.o
You copy the object to a TFTP server where it can be `seen' by the target.
		cp blah.o /tftpboot
Prior to starting a debugging session, the PATH on the host is set up:
		setenv PATH $PATH":/home/john"
On the target, (e.g., via startup script or from the Cexp> prompt) the PATH is also setup:
		Cexp> setenv("PATH","/TFTP/BOOTP_HOST/:<more dirs>:",1)
Start a GDB session on the host
		powerpc-rtems-gdb
Connect to the target
		(gdb) target rtems-remote <target>:2159
		// gdb obtains object file list and searches
        // PATH for 'blah.o'
Recompile `blah.c'
		cross-gcc -g -c blah.c -o /home/john/blah.o
		cp blah.o /tftpboot
Reload module from GDB prompt
		(gdb) rtems load blah.o


guest 2006-08-11