This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/9830] New: Add a way to show what the last function call returned


Hi there,

I frequently find myself in the position that I'd like to check what the last function called did return. (For 
example while stepping through nested function calls, or just after stepping over a return statement 
(C/C++/Objc).

This is generally not possible in GDB (from what I understand from the docs and from the ever helpfull 
#gdb chaannel)

I can aproximate some of this by trying print $eax and try to remember what the heck the right register 
is on a different plattform and also hope that struct returns aren't handled differently.

But, that really doesn't work very good.

So what I'd really want is something like 

print $return_value
or 
info return-value

(Whatever best suits the purpose, I haven't quite understood all the finer details of these commands)

Somebody on #gdb mentioned that this is not generally possible before the return has actually 
happened - but after it did, that sure is possible (and commands like "finish" already do it to some 
degree).

So, please do it. :)

Greetings, Martin

-- 
           Summary: Add a way to show what the last function call returned
           Product: gdb
           Version: 6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: spamfaenger at gmx dot de
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=9830

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]