[MI] -exec-return or CLI 'return' do not trigger MI events

Joel Brobecker brobecker@adacore.com
Fri Feb 12 10:54:00 GMT 2010


> For all I can tell, the 'return' command does not actually resume the
> target.  It just pops the stack.

I got caught by this tiny but important detail as well.  But if you look
at the GDB User's manual, it's very explicit about it.  Among many things,
it says:

    The return command does not resume execution; it leaves the program
    stopped in the state that would exist if the function had just returned.
    In contrast, the finish command (see Continuing and Stepping) resumes
    execution until the selected stack frame returns naturally. 

-- 
Joel



More information about the Gdb mailing list