How to print “optimized out” value in gdb

Question: I was debugging a program with gdb debugger. When I tried to print the value of a variable while tracing a function call, gdb says “<value optimized out>”, not displaying the value. How can I show the value of an <optimized out> variable in gdb? Modern compilers such as gcc are able to perform […]
Continue reading…

 

How to upgrade gcc on CentOS

Question: The default gcc version on CentOS is too old to build a particular application. How can I upgrade the version of gcc installed on CentOS? As of CentOS 6.5, the default version of gcc installed is 4.4.7. If you want to upgrade gcc on CentOS, you can install devtools, which is a CentOS version […]
Continue reading…