[all-commits] [llvm/llvm-project] 41b37f: [lldb] CommandObjectMemoryFind: Improve expression...

Michael Buch via All-commits all-commits at lists.llvm.org
Fri Jun 13 04:43:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41b37f05554ae59974675ae219430b5598c6159f
      https://github.com/llvm/llvm-project/commit/41b37f05554ae59974675ae219430b5598c6159f
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-06-13 (Fri, 13 Jun 2025)

  Changed paths:
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/test/API/functionalities/memory/find/TestMemoryFind.py

  Log Message:
  -----------
  [lldb] CommandObjectMemoryFind: Improve expression evaluation error messages (#144036)

We now bubble up the expression evaluation diagnostics to the user and
also distinguish between "expression failed to parse/run" versus other
ways in which expressions didn't complete (e.g., setup errors, etc.).

Before:
```
(lldb) memory find -e "" 0x16fdfedc0 0x16fdfede0
error: expression evaluation failed. pass a string instead
(lldb) memory find -e "invalid" 0x16fdfedc0 0x16fdfede0
error: expression evaluation failed. pass a string instead
```

After:
```
(lldb) memory find -e "" 0x16fdfedc0 0x16fdfede0
error: Expression evaluation failed:
error: No result returned from expression. Exit status: 1
(lldb) memory find -e "invalid" 0x16fdfedc0 0x16fdfede0
error: Expression evaluation failed:
error: <user expression 0>:1:1: use of undeclared identifier 'invalid'
    1 | invalid
      | ^~~~~~~
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list