I have global variable eg int NUM = 4;. When I attached to the working application with gdb – its hang. Now, I want to get value of NUM and change it. How to do this?
Maybe, possible examples for other data type like char[] and std::string ?
thanks
In gdb you should use
to show the value of INT and
to set INT equal to value.
In an array use
to set the element at index
element_indexin the arrayarray_variableto value.