https://github.com/kastiglione created https://github.com/llvm/llvm-project/pull/187795
None >From a03e44e0bdb6a85129a168011b3bafb8b99542bb Mon Sep 17 00:00:00 2001 From: Dave Lee <[email protected]> Date: Fri, 20 Mar 2026 14:13:16 -0700 Subject: [PATCH] [lldb][bytecode] Fix Update() and failing test --- lldb/source/DataFormatters/TypeSynthetic.cpp | 4 +++- .../bytecode-synthetic/main.cpp | 22 +++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) 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)` _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
