Remote-Debugging of FESA binaries via Console

First of all, make sure your binary was delivered to the FEC and is at least startable.

Two scripts are provided to minimize typing-effort when starting gdbserver on the FEC + gdb on the local maschine.

Download both scripts and give execution-right to them:
chmod +x RemoteDebug_script1.sh RemoteDebug_script2.sh

Now modify the first lines of both scripts according to your needs (all other lines should be fine).
// RemoteDebug_script1
REMOTE_HOST=sddsc007
CPU=i686
FESA_VERSION=1.0.0
DU_NAME=MyDeployUnit
BINARY_NAME=${DU_NAME}_M-0.1.0
PORT=112233
INSTANCE_FILE_NAME=DeviceData_${DU_NAME}_0.1.0.instance

// RemoteDebug_script2
REMOTE_HOST=sddsc007 //Needs to be identical to script1
PORT=112233 //Needs to be identical to script1

Now start each script in a seperate console (you can stay on the asl-cluster. No need to ssh to the FEC):

./RemoteDebug_script1.sh

> root@sddsc007's password:  //you will be asked for the password of the FEC
> *****
> ***** Environment setup for FESA3 complete.
> *****
> Process /opt/fesa/arch/eqp_software/MyDeployUnit/development/MyDeployUnit_M-0.1.0 created; pid = 1615
> Listening on port 112233

The first console will get stuck here. Go to the second console now! Later you can see the output of your binary in the first console !
./RemoteDebug_script2.sh

//gdb will print alot of text first
> GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6) 
> Copyright (C) 2010 Free Software Foundation, Inc.
> ....
> Created trace state variable $trace_timestamp for target's variable 1.
> (gdb)

// You can now type "continue" to start running, set breakpoints etc.

On any problems, feel free to ask the FESA-support !
I Attachment Action Size Date Who Comment
RemoteDebug_script1.shsh RemoteDebug_script1.sh manage 2 K 13 Nov 2013 - 14:55 AlexanderSchwinn starts gdb-server on the remote-maschine with the needed appl.-arguments
RemoteDebug_script2.shsh RemoteDebug_script2.sh manage 453 bytes 13 Nov 2013 - 14:55 AlexanderSchwinn Starts gdb on the current maschine, preconfigured to listen on the gdb-server of the remote-maschine
Topic revision: r2 - 13 Nov 2013, AlexanderSchwinn
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback