Debug RCE applications with xmd
Debug RCE applications with gdb
Debug RCE applications with the console
The default console application is usually stored as image 0 in the configuration flash and can be loaded by setting the front panel boot selector to 0 and by resetting the RC element. The console application provides three servers, each one with different functionality and each one accessed through a different UNIX application:
console
From a machine connected on the base interface subnet of the RCE with IP address/name <hostname> type:
console_host -h <hostname>
The application above will show a command line prompt if the connection to <hostname> is successful. Currently the following commands may be issued through this command line:
reboot: Reboot the processor remove <filenum>: Remove the file specified by <filenum> bootcfg <index> <image> <flags>: Sets boot vector <index> to load image <image> and switch configuration <flags> bootdir: Dumps flash boot directory contents filedir: Dumps flash file directory contents echo <message>: Enter a time-stamped message in the system log log: Dumps system log clear: Clears system log
debug
From a machine connected on the base interface subnet of the RCE with IP address/name <hostname> type:
debug_host -h <hostname> -f <exename>
Where <exename> is the file name, in the local UNIX file system, of the application which is currently running in the RCE and that is being debugged. The application above will show a command line prompt if the connection to <hostname> is successful. Currently the following commands may be issued through this command line:
gettime: print the current time in the RC element settime: set the current time in the RCE to be the same as in the UNIX host getexceptions: print the exceptions (if any) recorded by the RCE since the last reset/power-on clearexceptions: clear all the recorded exceptions getmessages: print all messages recorded by the RCE since the last reset/power-on clearmessages: clear all the recorded messages getcontext: shows a stack dump of the different threads running in the RCE dumpstats: shows a dump of the RCE network statistics burst <npackets> <nbytes>: sends <npackets> UDP ethernet packets from the UNIX host to the RCE burstrequest <npackets> <nbytes>: sends <npackets> raw ethernet packets from the RCE to the UNIX host echorequest <npackets> <nbytes>: sends <npackets> UDP packets from the UNIX host to the RCE, the RCE echoes back each packet it receives
Note that the <nbytes> arguments in the commands above indicates the maximum number of bytes contained in the packet payload. The actual number of payload bytes is a flat distribution random number between 0 and <nbytes>.
upload
From a machine connected on the base interface subnet of the RCE with IP address/name <hostname> type:
upload_elf_host -h <hostname> -i <imgnum> -f <filename>
Where <filename> is the file name, in the local UNIX file system, of the ELF file which is to be stored at image number <imgnum> in the RCE configuration flash memory. Note the image number must be between 1 and 15. You can then use the bootcfg command described in the console command line above to make the newly flashed image boot-able from the RCE.