[Lldb-commits] [lldb] [lldb][bytecode] Fix Update() and failing test (PR #187795)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 20 14:14:05 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Dave Lee (kastiglione)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/187795.diff
2 Files Affected:
- (modified) lldb/source/DataFormatters/TypeSynthetic.cpp (+3-1)
- (modified) lldb/test/API/functionalities/data-formatter/bytecode-synthetic/main.cpp (+11-11)
``````````diff
diff --git a/lldb/source/DataFormatters/TypeSynthetic.cpp b/lldb/source/DataFormatters/TypeSynthetic.cpp
index 1fc748fea85e0..e2962f8f4d1a1 100644
--- a/lldb/source/DataFormatters/TypeSynthetic.cpp
+++ b/lldb/source/DataFormatters/TypeSynthetic.cpp
@@ -278,8 +278,10 @@ BytecodeSyntheticChildren::FrontEnd::FrontEnd(
}
lldb::ChildCacheState BytecodeSyntheticChildren::FrontEnd::Update() {
- if (!m_impl.update)
+ if (!m_impl.update) {
+ m_self = m_init_results;
return ChildCacheState::eReuse;
+ }
FormatterBytecode::ControlStack control = {m_impl.update->getBuffer()};
FormatterBytecode::DataStack data = m_init_results;
diff --git a/lldb/test/API/functionalities/data-formatter/bytecode-synthetic/main.cpp b/lldb/test/API/functionalities/data-formatter/bytecode-synthetic/main.cpp
index 3e6ae77bbca83..d4ffa58363009 100644
--- a/lldb/test/API/functionalities/data-formatter/bytecode-synthetic/main.cpp
+++ b/lldb/test/API/functionalities/data-formatter/bytecode-synthetic/main.cpp
@@ -15,14 +15,14 @@ int main(int argc, char **argv) {
__attribute__((used, section("__DATA_CONST,__lldbformatters"))) unsigned char
_Account_synthetic[] =
- "\x01" // version
- "\x15" // remaining record size
- "\x07" // type name size
- "Account" // type name
- "\x00" // flags
- "\x02" // sig_get_num_children
- "\x02" // program size
- "\x20\x01" // `return 1`
- "\x04" // sig_get_child_at_index
- "\x06" // program size
- "\x02\x20\x00\x23\x11\x60"; // `return self.valobj.GetChildAtIndex(0)`
+ "\x01" // version
+ "\x12" // remaining record size
+ "\x07" // type name size
+ "Account" // type name
+ "\x00" // flags
+ "\x02" // sig_get_num_children
+ "\x02" // program size
+ "\x20\x01" // `return 1`
+ "\x04" // sig_get_child_at_index
+ "\x03" // program size
+ "\x23\x11\x60"; // `return self.valobj.GetChildAtIndex(idx)`
``````````
</details>
https://github.com/llvm/llvm-project/pull/187795
More information about the lldb-commits
mailing list