[Lldb-commits] [PATCH] D64194: [lldb] Fix crash due to dollar character in variable names.

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 4 09:47:08 PDT 2019


davide added inline comments.


================
Comment at: lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/main.c:4-5
+int main() {
+  int $foo = 42;
+  return 0; //%self.expect("expr $foo", substrs=['(int) $0 = 42'])
+}
----------------
davide wrote:
> what if you have another variable in the same scope named just `foo` ?
> What `expr $foo` will print? 
> I would expect this to be recognized as `expr $$foo`.
Actually, I think the previous example should be fine, on a second thought. The example that I think might break is the one where you have an identifier in your source code named `$R0.` Is that allowed?


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D64194





More information about the lldb-commits mailing list