ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

CMake optimizing out values in debug mode

asked 2013-11-10 06:38:06 -0600

vhwanger gravatar image

updated 2013-11-18 16:40:43 -0600

tfoote gravatar image

I'm trying to view some simple int variables in GDB, but they're all being marked as "value optimized out". At the top of my CMakeLists.txt file, I have


Do I need to set something else?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-11-10 20:45:03 -0600

tfoote gravatar image

You need to recompile what the section of code that you are running. And if you're inside a library you need to recompile that library. (What you have noted is correct for rosbuild based packages.)

edit flag offensive delete link more


This is actually after a make clean and rosmake.

vhwanger gravatar image vhwanger  ( 2013-11-12 09:22:10 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-11-10 06:38:06 -0600

Seen: 612 times

Last updated: Nov 10 '13