================
@@ -116,3 +116,174 @@ def test_seed_reg_const_undef(self):
         print(out)
         self.assertRegex(out, r"\b(i|argc)\s*=\s*(DW_OP_reg\d+\b|R[A-Z0-9]+)")
         self.assertNotIn("<decoding error>", out)
+
+    @no_debug_info_test
+    @skipIf(archs=no_match(["x86_64"]))
+    def test_structured_annotations_api(self):
+        """Test GetVariableAnnotations() API returns structured data"""
+        obj = self._build_obj("d_original_example.o")
+        target = self._create_target(obj)
+
+        main_symbols = target.FindSymbols("main")
+        self.assertTrue(main_symbols.IsValid() and main_symbols.GetSize() > 0,
+                       "Could not find 'main' symbol")
+
+        main_symbol = main_symbols.GetContextAtIndex(0).GetSymbol()
+        start_addr = main_symbol.GetStartAddress()
+        self.assertTrue(start_addr.IsValid(), "Invalid start address for main")
+
+        instructions = target.ReadInstructions(start_addr, 16)
+        self.assertGreater(instructions.GetSize(), 0, "No instructions read")
+
+        print(f"\nTesting GetVariableAnnotations() API on 
{instructions.GetSize()} instructions")
----------------
n2h9 wrote:

Updated :white_check_mark:  thank you :bowing_woman: 

https://github.com/llvm/llvm-project/pull/165163
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to