[Lldb-commits] [PATCH] D62547: (lldb-vscode) Evaluate expressions as LLDB commands when in REPL mode.

Ivan Hernandez via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 29 05:16:29 PDT 2019


ivanhernandez13 added a comment.

clayborg - I see the issue that this change would introduce and I’m not certain of a solution. Also, I’m not sure I understand what we get from keeping track of the selected thread. Isn’t the issue that the behavior is dependent on what thread is selected, and whether a variable exists in that thread?  
e.g.
Thread #1
Foo: “Foo”

Thread #2
 Bar: “Bar”

- Break at BP in Thread #1 *

> Foo
> “Foo”

- Select Thread #2 *

> Foo
> (lldb) Foo
> error: ‘Foo’ is not a valid command.

lanza - One motivation behind this was to support completions (see: https://github.com/ivanhernandez13/swift-lldb/commit/3311eef0afcf11d3426ff1d9e153e1641fd312b3) although I suppose it would be easy to hack support for that as well by simply checking for the “`” character and using only the rest of the string for completions.

I was not aware of that DAP feature request. I agree that a separate command and REPL console ultimately sounds like a better approach.

labath - As an Xcode user I was used to simply typing an lldb command, I made this change locally to better replicate Xcode’s behavior. I do however, see the issue with inconsistent behavior that this would introduce and I’m not certain there is a good solution for that.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62547/new/

https://reviews.llvm.org/D62547





More information about the lldb-commits mailing list