Skip to content

[lldb][bytecode] Compile pick ops using unsigned literal - #187376

Merged
kastiglione merged 2 commits into
llvm:mainfrom
kastiglione:lldb-bytecode-Compile-pick-ops-using-unsigned-literal
Mar 18, 2026
Merged

[lldb][bytecode] Compile pick ops using unsigned literal#187376
kastiglione merged 2 commits into
llvm:mainfrom
kastiglione:lldb-bytecode-Compile-pick-ops-using-unsigned-literal

Conversation

@kastiglione

@kastiglione kastiglione commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

The pick op requires an unsigned integer index. Use the u suffix when generating pick operations in the Python->formatter-bytecode compiler.

@llvmbot

llvmbot commented Mar 18, 2026

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-lldb

Author: Dave Lee (kastiglione)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/187376.diff

1 Files Affected:

  • (modified) lldb/examples/python/formatter_bytecode.py (+2-2)
diff --git a/lldb/examples/python/formatter_bytecode.py b/lldb/examples/python/formatter_bytecode.py
index e825110356ff6..da114a964f55c 100644
--- a/lldb/examples/python/formatter_bytecode.py
+++ b/lldb/examples/python/formatter_bytecode.py
@@ -1059,14 +1059,14 @@ def visit_Attribute(self, node: ast.Attribute) -> None:
             )
         attr_idx = self._attr_index(node.attr, node)
         pick_idx = self.num_temps + attr_idx
-        self._output(f"{pick_idx} pick")  # "# self.{node.attr}"
+        self._output(f"{pick_idx}u pick")  # "# self.{node.attr}"
         self.num_temps += 1
 
     def visit_Name(self, node: ast.Name) -> None:
         idx = self._stack_index(node)
         if idx is None:
             raise CompilerError(f"unknown local variable: {node.id}", node)
-        self._output(f"{idx} pick")  # "# {node.id}"
+        self._output(f"{idx}u pick")  # "# {node.id}"
         self.num_temps += 1
 
     def _visit_each(self, nodes: Sequence[ast.AST]) -> None:

@github-actions

github-actions Bot commented Mar 18, 2026

Copy link
Copy Markdown

🐧 Linux x64 Test Results

  • 33360 tests passed
  • 507 tests skipped

✅ The build succeeded and all tests passed.

@kastiglione
kastiglione merged commit d70ebc8 into llvm:main Mar 18, 2026
10 checks passed
@kastiglione
kastiglione deleted the lldb-bytecode-Compile-pick-ops-using-unsigned-literal branch March 18, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants