NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Method how to remote debug a dynamic lib (.so) running on a cRIO-9067 within Eclipse

My environnement :
 - cRIO-9067 running a dynamic lib xx.so called from lvrt (LV2016).
 - Eclipse Kepler Service Release 2) (for LV2014-2016)
 - Ethernet connexion and remote ssh debug session.
 
 The problematic:
  I'm looking for a systematic way to selected the right thread on the right core at the right adresse
 to be able to do a remote debug of a dynamic loaded lib running on the cRIO-9067.
 
 1) Now I'm able to establish the remote debug session with GDB.
 2) I'm looking in the console what is the process number on with the GDB is connnected and select the corresponding thread in the debug window in Eclipse.
 3) At this point I can see several adresses displayed with the first one displaying :"clock_nanosleep()" where the code has been interrupted.
 ...
 >Thread[14] 1553 [core0](Suspended:Step)
 clock_nanosleep() at 0xb6d8cb08
 0xb5487178
 0xb54843d0
 0xb5489220
 0xb5489220
 >Thread[15] 1554 [core0](Suspended:Container)
 ....
4) Now when I select : 0xb54843d0 : I able to inspect 'Expressions' where I've define some c structures 
 containing the variables that I want to inspect the content to debug.
 
 ->One problem I'm facing is that not all variables are available (some are displayed - other remain empty displaying : "Failed to execute MI command:-data-evaluate-expression (ft_context) Error message from debugger back end: There is no member named generic. ") depending on the memory section I've selected.

 ->Another problem is that when displaying a "float" value the content seem to be 'mis interpreted' probably a specific "cast" is required for "single" LV variables.
 
The main question:
 * is that the correct way of selecting the thread to do remote debug?
 * how choose the right memory section to debug the variables and non only parts of them?
 * can the dual core causes trouble to make a remote debug? (After setting the system in single core mode, nothing changed)
 
After some investigations:
* Eclipse seem's having trouble displaying a complex structure composed of severable other sub-struct.
* The data are returned in the console GDB of Eclipse, but you have to interpret yourself the returned text.
* I still having doubt about the content returned as it does not correspond to the data send via the lib methods. It is as the gdb and the lib calls are working each in their context.
 
Any hint or similar experience would be appreciated.
0 Kudos
Message 1 of 1
(2,019 Views)