Search code examples
c++debuggingredhawksdr

How to bring out debugging variable values in redhawk 2.12 ide in the debug mode?


My system is centos6 and redhawk2.12. I could do debugging smoothly with the component created in Python. However, I always got "value optimized out" while debugging with C++ component. I have found a thread in this board regarding redhawk cpp module debugging (Debugging in the REDHAWK IDE), which says this problem can be caused by the incorrect setup of the debug level. Does anybody know how to setup the "debug level" value using REDHAWK IDE solely for the debugging purpose (in debug mode so values not being optimized out)?

Thanks in advance.


Solution

  • I would follow the directions from that post and use the command line to build the component with the CXXFLAGS set for debugging "-O0 -g". If you prefer you can use an environment variable so that you can continue to build/work from the IDE. In that case you would close the IDE, set the environment variable from the terminal, then in the same terminal launch the IDE like so.

    [redhawk@a6894bf32cf5 git]$ export CXXFLAGS="-O0 -g"
    [redhawk@a6894bf32cf5 git]$ rhide
    

    You may need to perform a "clean" on the project for this to work. Or from the command line issue a "make dist-clean" within the cpp folder.