Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

GDB inspecting a return value

(1/1)

Manolo:
Hello
Whenever I have a function that returns a value that is not previously assigned to a var, if I want to know that return value I have to send the command finish to GDB and search for "Value returned is $1 = true" or similar. The search is hard (many many lines)

Can this returned value part of the watches window?

Thanks,
Manolo

ollydbg:
By reading this: http://stackoverflow.com/a/267687/154911
I see that "finish" is the only command to get the return value. So, maybe, we need to parse the returned text from GDB after we type/send "finish" command.

EDIT:
If we use gdb MI https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Program-Execution.html
we can also get a returned value.

oBFusCATed:
I don't think this could be implemented reliably.
Because if you never execute the finish/-exec-finish commands, then you won't see any return value ever.
If you execute another command like step you'll loose the return value.

Please post a feature request on the sf.net project page. Here it will get lost.

Navigation

[0] Message Index

Go to full version