Allow void expressions to be evaluated in LLDB without printing <no result>

Number:rdar://11225022 Date Originated:11-Apr-2012 02:01 PM
Status:Open Resolved:
Product:Developer Tools Product Version:4.3.2 (1177)
Classification:Enhancement Reproducible:Yes
I use continuing breakpoints & breakpoint actions to define & call functions at runtime to aid debugging.

For example, rather than inserting a call to NSLog(), recompiling & relaunching my application, I'll simply add a breakpoint with a debugger command action, and use LLDB's `expr` command to call NSLog().

This works well, however LLDB's `expr` command expects a return value for the expression so that it can be printed according to the format defined by the `--format` flag. If your evaluation has a `void` return value, "<no result> is displayed in the debugger output.

There should be an option (perhaps a new `--format` value) which suppresses the ClangUserExpression::kNoResult error.

Steps to Reproduce:

Call a void function in an expression.

Expected Results:

Expression is evaluated, nothing is displayed in the debugger console.

Actual Results:

Expression is evaluated, "<no reesult>" is displayed in the debugger console.






Duped as rdar://11225150

Great news

I just got a message from ADR saying this has been addressed in the next major point release of Xcode. Huzzah!

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!