[all-commits] [llvm/llvm-project] 442f99: [lldb] Fix evaluating expressions without JIT in a...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Fri Jun 27 14:30:45 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 442f99d7698a4ca87ebb16cb22df610c45d4698a
      https://github.com/llvm/llvm-project/commit/442f99d7698a4ca87ebb16cb22df610c45d4698a
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2025-06-27 (Fri, 27 Jun 2025)

  Changed paths:
    M lldb/include/lldb/Expression/IRMemoryMap.h
    M lldb/source/Expression/IRMemoryMap.cpp
    M lldb/source/Expression/Materializer.cpp
    A lldb/test/API/functionalities/postmortem/elf-core/expr/TestExpr.py
    A lldb/test/API/functionalities/postmortem/elf-core/expr/linux-x86_64.core
    A lldb/test/API/functionalities/postmortem/elf-core/expr/linux-x86_64.out
    A lldb/test/API/functionalities/postmortem/elf-core/expr/main.cpp
    M lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py

  Log Message:
  -----------
  [lldb] Fix evaluating expressions without JIT in an object context (#145599)

If a server does not support allocating memory in an inferior process or
when debugging a core file, evaluating an expression in the context of a
value object results in an error:

```
error: <lldb wrapper prefix>:43:1: use of undeclared identifier '$__lldb_class'
   43 | $__lldb_class::$__lldb_expr(void *$__lldb_arg)
      | ^
```

Such expressions require a live address to be stored in the value
object. However, `EntityResultVariable::Dematerialize()` only sets
`ret->m_live_sp` if JIT is available, even if the address points to the
process memory and no custom allocations were made. Similarly,
`EntityPersistentVariable::Dematerialize()` tries to deallocate memory
based on the same check, resulting in an error if the memory was not
previously allocated in `EntityPersistentVariable::Materialize()`.

As an unintended bonus, the patch also fixes a FIXME case in
`TestCxxChar8_t.py`.



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