5 ms·
Having been using gdb (have to!) for a while again, one immediately comes to appreciate the wonder that is VS debugger.
by NotCamelCase 7y ago
Having been using gdb (have to!) for a while again, one immediately comes to appreciate the wonder that is VS debugger.
- aidenn0 7y agoIt's possible to get the information with any debugger, you just need to know the ABI. On amd64 with the SystemV ABI, its %rax for integer return values and %xmm0 for floating-point return values. If you don't want to remember, you can write a macro for it. GDB probably has something builtin for this, but I gave up trying to find features in GDB a long time ago. [edit] Stackoverflow seems to be of the opinion that GDB doesn't have a tool for automatically showing the return value of a just-called function. However if you step into a function and execute the command "finish" you will return from the function and print the value. Properly showing the return value with source-level (rather than instruction-level) debugging is a non-trivial feature to get right.
- NotCamelCase 7y agoOf course, I can chase return registers by myself all day long, problem is I don't want to. Then again, what about pointers? PODs? strings? If you use VS debugger, you can see how distinctly it can display these, which is as different as night and day to me.