Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-24 Thread Phabricator
This revision was automatically updated to reflect the committed changes. Closed by commit rL243187: Specify a language to use when parsing expressions. (authored by dperchik). Changed prior to commit: http://reviews.llvm.org/D11447?vs=30600&id=30626#toc Repository: rL LLVM http://reviews.l

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-24 Thread Greg Clayton
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good, thanks for fixing everything. Repository: rL LLVM http://reviews.llvm.org/D11447 ___ lldb-commits mailing list lldb-commits@c

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-24 Thread Dawn Perchik
dawn updated this revision to Diff 30600. dawn added a comment. Changed test to use SB APIs. Repository: rL LLVM http://reviews.llvm.org/D11447 Files: source/Commands/CommandObjectExpression.cpp source/Commands/CommandObjectExpression.h test/expression_command/options/Makefile test/e

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-24 Thread Sean Callanan
spyffe added a comment. This all looks all right to me, except that we should print errors if C or Objective-C is requested, because we can only run in C++ or Objective-C++ mode. We should be careful to switch away from ObjC++ only on request, and not based on the current compilation unit's lang

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-24 Thread Greg Clayton
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Please use SB API calls for expression evaluation instead of self.expect calls. Comment at: test/expression_command/options/TestExprOptions.py:57-87 @@ +56,33 @@

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Dawn Perchik
dawn updated the summary for this revision. dawn updated this revision to Diff 30546. dawn added a comment. Test case was fixed as directed. Repository: rL LLVM http://reviews.llvm.org/D11447 Files: source/Commands/CommandObjectExpression.cpp source/Commands/CommandObjectExpression.h t

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Greg Clayton
clayborg added a comment. There are many tests that evaluate expressions using the SB API: expression_command/call-restarts/TestCallThatRestarts.py expression_command/call-throws/TestCallThatThrows.py expression_command/char/TestExprsChar.py expression_command/formatters/TestFormatters.py

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Greg Clayton
clayborg added a comment. To evaluate an expression use the SB API: threads = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint) self.assertTrue(len(threads) == 1) thread = threads[0] frame = thread.GetFrameAtIndex(0) options = lldb.SBExpressionOptions() value = frame

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Dawn Perchik
dawn added a comment. Ah! expect takes a 'error' argument :)This works: self.expect("expression blabla", error=True, startstr = "error") Repository: rL LLVM http://reviews.llvm.org/D11447 ___ lldb-commits mailing list lldb-commits@cs.uiu

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Dawn Perchik
dawn added a comment. In http://reviews.llvm.org/D11447#211105, @clayborg wrote: > See inlined comments. I am trying to check textual output from commands. expect() doesn't take a check=False option, and runCmd() doesn't check for output afaik. It would be possible to pipe all the output a

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Greg Clayton
clayborg added a comment. See inlined comments. Comment at: test/expression_command/options/TestExprOptions.py:46-55 @@ +45,12 @@ + +# FIXME: runCmd (called by expect) fails if an error is +# returned making it impossible to add negative tests. As a +# w

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Greg Clayton
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. runCmd can take a named argument "check = False" that will stop the mandatory checking of the success of the command. Comment at: test/expression_command/option

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Greg Clayton
clayborg added a comment. One thing you might want to fix is to use: self.dbg.HandleCommand("...") This avoids the need for the command to succeed. Repository: rL LLVM http://reviews.llvm.org/D11447 ___ lldb-commits mailing list lldb-commits

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Greg Clayton
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good. Repository: rL LLVM http://reviews.llvm.org/D11447 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiu

Re: [Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-23 Thread Dawn Perchik
dawn added a comment. Please review. I have another patch which depends on this one. Repository: rL LLVM http://reviews.llvm.org/D11447 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commit

[Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

2015-07-22 Thread Dawn Perchik
dawn created this revision. dawn added reviewers: clayborg, jingham, spyffe. dawn added a subscriber: lldb-commits. dawn set the repository for this revision to rL LLVM. This patch adds the option -l/--language to the expression command, for use when setting the language options or choosing an al