gdb - how to print result of evaluation for C++ -
Ive was looking around but was unable to figure out how to print in GDB in the outcome of an evaluation is. For example, in the code given below:
if (strcmp (current_node-> word, min_node- & gt; word) & gt; min_node = current_node;
(Up I was trying a possible method to check the alphabetical order for stars, and it was not certain that it works properly)
Now I can see min_node and if the value changes but this is sometimes more complex in the inserted code, I was wondering if there is an easy way to see the evaluation of a test on the line, where Currently GDB / Programs Week is.
Many thanks!
There is no expression-level single phase in GDB, if you are asking for it.
Your Options (Typically <<>
>
> It is surprising, this works: GDB can evaluate the function call, by executing the code in the ongoing program and executing the code. Of course, it is quite dangerous If the function can have a bad effect or crash; in this case, it is so harmless that people will not usually think of potential problems.
Comments
Post a Comment