diff options
| author | Mingming Liu <mingmingl@google.com> | 2025-09-10 15:25:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-10 15:25:31 -0700 |
| commit | 1417dafa1db9cb1b2b09438aa9f53ea5ab6e36e2 (patch) | |
| tree | 57f4b1f313c8cf74eed8819870f39c36ea263c68 /lldb/test/API/functionalities | |
| parent | 898b813bc8a6d0276bf0f4769f5f2f64b34e632d (diff) | |
| parent | b8cefcb601ddaa18482555c4ff363c01a270c2fe (diff) | |
Merge branch 'main' into users/mingmingl-llvm/samplefdo-profile-formatusers/mingmingl-llvm/samplefdo-profile-format
Diffstat (limited to 'lldb/test/API/functionalities')
42 files changed, 3261 insertions, 55 deletions
diff --git a/lldb/test/API/functionalities/asan/TestMemoryHistory.py b/lldb/test/API/functionalities/asan/TestMemoryHistory.py index 66f6e3e7502c..8ae2d4a60d60 100644 --- a/lldb/test/API/functionalities/asan/TestMemoryHistory.py +++ b/lldb/test/API/functionalities/asan/TestMemoryHistory.py @@ -2,7 +2,6 @@ Test that ASan memory history provider returns correct stack traces """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -10,6 +9,7 @@ from lldbsuite.test import lldbplatform from lldbsuite.test import lldbutil from lldbsuite.test_event.build_exception import BuildError + class MemoryHistoryTestCase(TestBase): @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default @expectedFailureNetBSD @@ -94,6 +94,11 @@ class MemoryHistoryTestCase(TestBase): ) self.check_traces() + if self.platformIsDarwin(): + # Make sure we're not stopped in the sanitizer library but instead at the + # point of failure in the user-code. + self.assertEqual(self.frame().GetFunctionName(), "main") + # do the same using SB API process = self.dbg.GetSelectedTarget().process val = ( @@ -218,6 +223,11 @@ class MemoryHistoryTestCase(TestBase): self.check_traces() + if self.platformIsDarwin(): + # Make sure we're not stopped in the sanitizer library but instead at the + # point of failure in the user-code. + self.assertEqual(self.frame().GetFunctionName(), "main") + # make sure the 'memory history' command still works even when we're # generating a report now self.expect( diff --git a/lldb/test/API/functionalities/asan/TestReportData.py b/lldb/test/API/functionalities/asan/TestReportData.py index dd6834a01b80..c832436b0f44 100644 --- a/lldb/test/API/functionalities/asan/TestReportData.py +++ b/lldb/test/API/functionalities/asan/TestReportData.py @@ -2,7 +2,6 @@ Test the AddressSanitizer runtime support for report breakpoint and data extraction. """ - import json import lldb from lldbsuite.test.decorators import * @@ -10,6 +9,7 @@ from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil from lldbsuite.test_event.build_exception import BuildError + class AsanTestReportDataCase(TestBase): @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default @expectedFailureNetBSD @@ -67,6 +67,11 @@ class AsanTestReportDataCase(TestBase): lldb.eStopReasonInstrumentation, ) + if self.platformIsDarwin(): + # Make sure we're not stopped in the sanitizer library but instead at the + # point of failure in the user-code. + self.assertEqual(self.frame().GetFunctionName(), "main") + self.expect( "bt", "The backtrace should show the crashing line", diff --git a/lldb/test/API/functionalities/completion/TestCompletion.py b/lldb/test/API/functionalities/completion/TestCompletion.py index e7c53729f209..45750c7ac081 100644 --- a/lldb/test/API/functionalities/completion/TestCompletion.py +++ b/lldb/test/API/functionalities/completion/TestCompletion.py @@ -676,8 +676,8 @@ class CommandLineCompletionTestCase(TestBase): self.check_completion_with_desc( "breakpoint set -", [ - ["-h", "Set the breakpoint on exception catcH."], - ["-w", "Set the breakpoint on exception throW."], + ["-h", "Set the breakpoint on exception catch."], + ["-w", "Set the breakpoint on exception throw."], ], ) @@ -685,8 +685,8 @@ class CommandLineCompletionTestCase(TestBase): self.check_completion_with_desc( "breakpoint set --", [ - ["--on-catch", "Set the breakpoint on exception catcH."], - ["--on-throw", "Set the breakpoint on exception throW."], + ["--on-catch", "Set the breakpoint on exception catch."], + ["--on-throw", "Set the breakpoint on exception throw."], ], ) @@ -694,8 +694,8 @@ class CommandLineCompletionTestCase(TestBase): self.check_completion_with_desc( "breakpoint set --on-", [ - ["--on-catch", "Set the breakpoint on exception catcH."], - ["--on-throw", "Set the breakpoint on exception throW."], + ["--on-catch", "Set the breakpoint on exception catch."], + ["--on-throw", "Set the breakpoint on exception throw."], ], ) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py index f135da70c7b4..9ba10575d6fe 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py @@ -29,7 +29,6 @@ class StdRangesRefViewDataFormatterTestCase(TestBase): def do_test(self): """Test that std::ranges::ref_view is formatted correctly when printed.""" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "Break here", lldb.SBFileSpec("main.cpp", False) ) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py index fec20bae997e..6a27b5d2f078 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/TestDataFormatterStdString.py @@ -80,6 +80,8 @@ class StdStringDataFormatterTestCase(TestBase): '(%s::string) Q = "quite a long std::strin with lots of info inside it"' % ns, "(%s::string *) null_str = nullptr" % ns, + '(CustomString) custom_str = "hello!"', + '(CustomWString) custom_wstr = L"hello!"', ], ) @@ -143,6 +145,10 @@ class StdStringDataFormatterTestCase(TestBase): '(%s::u16string) u16_empty = u""' % ns, '(%s::u32string) u32_string = U"🍄🍅🍆🍌"' % ns, '(%s::u32string) u32_empty = U""' % ns, + '(CustomStringU16) custom_u16 = u"ß水氶"', + '(CustomStringU16) custom_u16_empty = u""', + '(CustomStringU32) custom_u32 = U"🍄🍅🍆🍌"', + '(CustomStringU32) custom_u32_empty = U""', ], ) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/main.cpp index f22c890861d0..577b78e35fc1 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string/main.cpp @@ -1,6 +1,33 @@ +#include <cstdlib> #include <stdint.h> #include <string> +template <typename T> struct CustomAlloc { + using value_type = T; + using pointer = value_type *; + using const_pointer = const value_type *; + using size_type = std::size_t; + + pointer allocate(size_type n) { return (T *)malloc(n * sizeof(T)); } + + void deallocate(pointer p, size_type) { + if (p) + free(p); + } +}; + +using CustomString = + std::basic_string<char, std::char_traits<char>, CustomAlloc<char>>; + +using CustomWString = + std::basic_string<wchar_t, std::char_traits<wchar_t>, CustomAlloc<wchar_t>>; + +using CustomStringU16 = std::basic_string<char16_t, std::char_traits<char16_t>, + CustomAlloc<char16_t>>; + +using CustomStringU32 = std::basic_string<char32_t, std::char_traits<char32_t>, + CustomAlloc<char32_t>>; + size_t touch_string(std::string &in_str) { return in_str.size(); // Break here to look at bad string } @@ -99,8 +126,16 @@ int main() { std::string *pq = &q; std::string *pQ = &Q; + CustomString custom_str("hello!"); + CustomWString custom_wstr(L"hello!"); + CustomStringU16 custom_u16(u16_string.c_str()); + CustomStringU16 custom_u16_empty(u""); + CustomStringU32 custom_u32(u32_string.c_str()); + CustomStringU32 custom_u32_empty(U""); + S.assign(L"!!!!!"); // Set break point at this line. std::string *not_a_string = (std::string *)0x0; touch_string(*not_a_string); + return 0; } diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py index 1a23d9a19fe1..c3d51a49c3f5 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/TestDataFormatterLibcxxInvalidVectorSimulator.py @@ -21,21 +21,21 @@ class LibcxxInvalidVectorDataFormatterSimulatorTestCase(TestBase): self.expect( "frame variable v1", - substrs=["size=error: Invalid value for end of vector."], + substrs=["size=error: invalid value for end of vector"], ) self.expect( "frame variable v2", - substrs=["size=error: Invalid value for start of vector."], + substrs=["size=error: invalid value for start of vector"], ) self.expect( "frame variable v3", - substrs=["size=error: Start of vector data begins after end pointer."], + substrs=["size=error: start of vector data begins after end pointer"], ) self.expect( "frame variable v4", - substrs=["size=error: Failed to determine start/end of vector data."], + substrs=["size=error: failed to determine start/end of vector data"], ) self.expect( "frame variable v5", - substrs=["size=error: Size not multiple of element size."], + substrs=["size=error: size not multiple of element size"], ) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp index f10811817c0d..5943b35deab8 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp @@ -1,4 +1,4 @@ -#define COMPRESSED_PAIR_REV 3 +#define COMPRESSED_PAIR_REV 4 #include <libcxx-simulators-common/compressed_pair.h> namespace std { diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py index c8d9c2e389a0..f27fc2e3c456 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py @@ -28,7 +28,7 @@ class LibcxxStringDataFormatterSimulatorTestCase(TestBase): for v in [None, "ALTERNATE_LAYOUT"]: for r in range(6): - for c in range(4): + for c in range(5): name = "test_r%d_c%d" % (r, c) defines = ["REVISION=%d" % r, "COMPRESSED_PAIR_REV=%d" % c] if v: diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp index cf431e524069..b19c05159670 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/main.cpp @@ -209,7 +209,7 @@ public: __long &getLongRep() { #if COMPRESSED_PAIR_REV == 0 return __r_.first().__l; -#elif COMPRESSED_PAIR_REV <= 3 +#else return __rep_.__l; #endif } @@ -217,14 +217,14 @@ public: __short &getShortRep() { #if COMPRESSED_PAIR_REV == 0 return __r_.first().__s; -#elif COMPRESSED_PAIR_REV <= 3 +#else return __rep_.__s; #endif } #if COMPRESSED_PAIR_REV == 0 std::__lldb::__compressed_pair<__rep, allocator_type> __r_; -#elif COMPRESSED_PAIR_REV <= 3 +#else _LLDB_COMPRESSED_PAIR(__rep, __rep_, allocator_type, __alloc_); #endif diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/TestDataFormatterLibcxxUniquePtrSimulator.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/TestDataFormatterLibcxxUniquePtrSimulator.py index e623c3a1413b..1e25ac947203 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/TestDataFormatterLibcxxUniquePtrSimulator.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/TestDataFormatterLibcxxUniquePtrSimulator.py @@ -26,7 +26,7 @@ class LibcxxUniquePtrDataFormatterSimulatorTestCase(TestBase): ) -for r in range(4): +for r in range(5): name = "test_r%d" % r defines = ["COMPRESSED_PAIR_REV=%d" % r] diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp index 3d174a91cc26..bd840aaceffa 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp @@ -20,8 +20,7 @@ public: std::__lldb::__compressed_pair<pointer, deleter_type> __ptr_; explicit unique_ptr(pointer __p) noexcept : __ptr_(__p, std::__lldb::__value_init_tag()) {} -#elif COMPRESSED_PAIR_REV == 1 || COMPRESSED_PAIR_REV == 2 || \ - COMPRESSED_PAIR_REV == 3 +#else _LLDB_COMPRESSED_PAIR(pointer, __ptr_, deleter_type, __deleter_); explicit unique_ptr(pointer __p) noexcept : __ptr_(__p), __deleter_() {} #endif diff --git a/lldb/test/API/functionalities/disassembler-variables/Makefile b/lldb/test/API/functionalities/disassembler-variables/Makefile new file mode 100644 index 000000000000..3d4bcd22fa65 --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/Makefile @@ -0,0 +1,32 @@ +# List all assembler inputs stable test fixtures. +ASM_SOURCES := \ + d_original_example.s \ + regs_int_params.s \ + regs_fp_params.s \ + regs_mixed_params.s \ + live_across_call.s \ + loop_reg_rotate.s \ + seed_reg_const_undef.s + +ASM_OBJS := $(ASM_SOURCES:.s=.o) + +# Provide a tiny dummy so the harness can link an exe without ASM_OBJS. +C_SOURCES := dummy_main.c + +# Generating the dummy source on demand. +dummy_main.c: + @echo 'int main(void){return 0;}' > $@ + +# Assemble .s → .o using the configured compiler. +%.o: %.s + $(CC) -c -x assembler $< -o $@ + +# Default target: build all .o fixtures and the dummy exe. +.PHONY: all +all: $(ASM_OBJS) $(EXE) + +# Keeping things tidy. +clean:: + $(RM) -f $(ASM_OBJS) dummy_main.c + +include Makefile.rules diff --git a/lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py b/lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py new file mode 100644 index 000000000000..f107efbdddde --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/TestVariableAnnotationsDisassembler.py @@ -0,0 +1,118 @@ +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +import lldb +import os +import re + + +# Requires ELF assembler directives (.section … @progbits, .ident, etc.); +# not compatible with COFF/Mach-O toolchains. +@skipUnlessPlatform(["linux", "android", "freebsd", "netbsd"]) +class TestVariableAnnotationsDisassembler(TestBase): + def _build_obj(self, obj_name: str) -> str: + # Let the Makefile build all .o’s (pattern rule). Then grab the one we need. + self.build() + obj = self.getBuildArtifact(obj_name) + self.assertTrue(os.path.exists(obj), f"missing object: {obj}") + return obj + + def _create_target(self, path): + target = self.dbg.CreateTarget(path) + self.assertTrue(target, f"failed to create target for {path}") + return target + + def _disassemble_verbose_symbol(self, symname): + self.runCmd(f"disassemble -n {symname} -v", check=True) + return self.res.GetOutput() + + @skipIf(archs=no_match(["x86_64"])) + def test_d_original_example_O1(self): + obj = self._build_obj("d_original_example.o") + target = self._create_target(obj) + out = self._disassemble_verbose_symbol("main") + print(out) + self.assertIn("argc = ", out) + self.assertIn("argv = ", out) + self.assertIn("i = ", out) + self.assertNotIn("<decoding error>", out) + + @no_debug_info_test + @skipIf(archs=no_match(["x86_64"])) + def test_regs_int_params(self): + obj = self._build_obj("regs_int_params.o") + target = self._create_target(obj) + out = self._disassemble_verbose_symbol("regs_int_params") + print(out) + self.assertRegex(out, r"\ba\s*=\s*(DW_OP_reg5\b|RDI\b)") + self.assertRegex(out, r"\bb\s*=\s*(DW_OP_reg4\b|RSI\b)") + self.assertRegex(out, r"\bc\s*=\s*(DW_OP_reg1\b|RDX\b)") + self.assertRegex(out, r"\bd\s*=\s*(DW_OP_reg2\b|RCX\b)") + self.assertRegex(out, r"\be\s*=\s*(DW_OP_reg8\b|R8\b)") + self.assertRegex(out, r"\bf\s*=\s*(DW_OP_reg9\b|R9\b)") + self.assertNotIn("<decoding error>", out) + + @no_debug_info_test + @skipIf(archs=no_match(["x86_64"])) + def test_regs_fp_params(self): + obj = self._build_obj("regs_fp_params.o") + target = self._create_target(obj) + out = self._disassemble_verbose_symbol("regs_fp_params") + print(out) + self.assertRegex(out, r"\ba\s*=\s*(DW_OP_reg17\b|XMM0\b)") + self.assertRegex(out, r"\bb\s*=\s*(DW_OP_reg18\b|XMM1\b)") + self.assertRegex(out, r"\bc\s*=\s*(DW_OP_reg19\b|XMM2\b)") + self.assertRegex(out, r"\bd\s*=\s*(DW_OP_reg20\b|XMM3\b)") + self.assertRegex(out, r"\be\s*=\s*(DW_OP_reg21\b|XMM4\b)") + self.assertRegex(out, r"\bf\s*=\s*(DW_OP_reg22\b|XMM5\b)") + self.assertNotIn("<decoding error>", out) + + @no_debug_info_test + @skipIf(archs=no_match(["x86_64"])) + def test_regs_mixed_params(self): + obj = self._build_obj("regs_mixed_params.o") + target = self._create_target(obj) + out = self._disassemble_verbose_symbol("regs_mixed_params") + print(out) + self.assertRegex(out, r"\ba\s*=\s*(DW_OP_reg5\b|RDI\b)") + self.assertRegex(out, r"\bb\s*=\s*(DW_OP_reg4\b|RSI\b)") + self.assertRegex(out, r"\bx\s*=\s*(DW_OP_reg17\b|XMM0\b|DW_OP_reg\d+\b)") + self.assertRegex(out, r"\by\s*=\s*(DW_OP_reg18\b|XMM1\b|DW_OP_reg\d+\b)") + self.assertRegex(out, r"\bc\s*=\s*(DW_OP_reg1\b|RDX\b)") + self.assertRegex(out, r"\bz\s*=\s*(DW_OP_reg19\b|XMM2\b|DW_OP_reg\d+\b)") + self.assertNotIn("<decoding error>", out) + + @no_debug_info_test + @skipIf(archs=no_match(["x86_64"])) + def test_live_across_call(self): + obj = self._build_obj("live_across_call.o") + target = self._create_target(obj) + out = self._disassemble_verbose_symbol("live_across_call") + print(out) + self.assertRegex(out, r"\bx\s*=\s*(DW_OP_reg5\b|RDI\b)") + self.assertIn("call", out) + self.assertRegex(out, r"\br\s*=\s*(DW_OP_reg0\b|RAX\b|DW_OP_reg\d+\b)") + self.assertNotIn("<decoding error>", out) + + @no_debug_info_test + @skipIf(archs=no_match(["x86_64"])) + def test_loop_reg_rotate(self): + obj = self._build_obj("loop_reg_rotate.o") + target = self._create_target(obj) + out = self._disassemble_verbose_symbol("loop_reg_rotate") + print(out) + self.assertRegex(out, r"\bn\s*=\s*(DW_OP_reg\d+\b|R[A-Z0-9]+)") + self.assertRegex(out, r"\bseed\s*=\s*(DW_OP_reg\d+\b|R[A-Z0-9]+)") + self.assertRegex(out, r"\bk\s*=\s*(DW_OP_reg\d+\b|R[A-Z0-9]+)") + self.assertRegex(out, r"\bj\s*=\s*(DW_OP_reg\d+\b|R[A-Z0-9]+)") + self.assertRegex(out, r"\bi\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_seed_reg_const_undef(self): + obj = self._build_obj("seed_reg_const_undef.o") + target = self._create_target(obj) + out = self._disassemble_verbose_symbol("main") + 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) diff --git a/lldb/test/API/functionalities/disassembler-variables/d_original_example.s b/lldb/test/API/functionalities/disassembler-variables/d_original_example.s new file mode 100644 index 000000000000..c38742cfc683 --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/d_original_example.s @@ -0,0 +1,461 @@ +/* Original C (for context): +* #include <stdio.h> +* +* int main(int argc, char **argv) { +* for (int i = 1; i < argc; ++i) +* puts(argv[i]); +* return 0; +* } +*/ + .file "d_original_example.c" + .text + .globl main # -- Begin function main + .p2align 4 + .type main,@function +main: # @main +.Lfunc_begin0: + .file 0 "." "d_original_example.c" md5 0x25192a1d5a6018cf37d369f9004fab00 + .cfi_startproc +# %bb.0: # %entry + #DEBUG_VALUE: main:argc <- $edi + #DEBUG_VALUE: main:argv <- $rsi + #DEBUG_VALUE: i <- 1 + .loc 0 4 21 prologue_end # d_original_example.c:4:21 + cmpl $2, %edi +.Ltmp0: + .loc 0 4 3 is_stmt 0 # d_original_example.c:4:3 + jl .LBB0_4 +.Ltmp1: +# %bb.1: # %for.body.preheader + #DEBUG_VALUE: main:argc <- $edi + #DEBUG_VALUE: main:argv <- $rsi + #DEBUG_VALUE: i <- 1 + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset %rbp, -16 + movq %rsp, %rbp + .cfi_def_cfa_register %rbp + pushq %r15 + pushq %r14 + pushq %rbx + pushq %rax + .cfi_offset %rbx, -40 + .cfi_offset %r14, -32 + .cfi_offset %r15, -24 + movq %rsi, %rbx +.Ltmp2: + .loc 0 4 21 # d_original_example.c:4:21 + movl %edi, %r14d +.Ltmp3: + #DEBUG_VALUE: main:argc <- $r14d + .loc 0 0 21 # d_original_example.c:0:21 + movl $1, %r15d +.Ltmp4: + .p2align 4 +.LBB0_2: # %for.body + # =>This Inner Loop Header: Depth=1 + #DEBUG_VALUE: main:argc <- $r14d + #DEBUG_VALUE: main:argv <- $rbx + #DEBUG_VALUE: i <- $r15 + .loc 0 5 10 is_stmt 1 # d_original_example.c:5:10 + movq (%rbx,%r15,8), %rdi + .loc 0 5 5 is_stmt 0 # d_original_example.c:5:5 + callq puts@PLT +.Ltmp5: + .loc 0 4 29 is_stmt 1 # d_original_example.c:4:29 + incq %r15 +.Ltmp6: + #DEBUG_VALUE: i <- $r15 + .loc 0 4 21 is_stmt 0 # d_original_example.c:4:21 + cmpq %r15, %r14 +.Ltmp7: + .loc 0 4 3 # d_original_example.c:4:3 + jne .LBB0_2 +.Ltmp8: +# %bb.3: + #DEBUG_VALUE: main:argc <- $r14d + #DEBUG_VALUE: main:argv <- $rbx + #DEBUG_VALUE: i <- $r15 + .loc 0 0 3 # d_original_example.c:0:3 + addq $8, %rsp + popq %rbx +.Ltmp9: + #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rsi + popq %r14 +.Ltmp10: + #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $edi + popq %r15 + popq %rbp + .cfi_def_cfa %rsp, 8 + .cfi_restore %rbx + .cfi_restore %r14 + .cfi_restore %r15 + .cfi_restore %rbp +.Ltmp11: +.LBB0_4: # %for.cond.cleanup + #DEBUG_VALUE: main:argc <- [DW_OP_LLVM_entry_value 1] $edi + #DEBUG_VALUE: main:argv <- [DW_OP_LLVM_entry_value 1] $rsi + .loc 0 6 3 is_stmt 1 # d_original_example.c:6:3 + xorl %eax, %eax + retq +.Ltmp12: +.Lfunc_end0: + .size main, .Lfunc_end0-main + .cfi_endproc + .file 1 "/usr/include" "stdio.h" md5 0xf31eefcc3f15835fc5a4023a625cf609 + # -- End function + .section .debug_loclists,"",@progbits + .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length +.Ldebug_list_header_start0: + .short 5 # Version + .byte 8 # Address size + .byte 0 # Segment selector size + .long 3 # Offset entry count +.Lloclists_table_base0: + .long .Ldebug_loc0-.Lloclists_table_base0 + .long .Ldebug_loc1-.Lloclists_table_base0 + .long .Ldebug_loc2-.Lloclists_table_base0 +.Ldebug_loc0: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp3-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 85 # super-register DW_OP_reg5 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp3-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp10-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 94 # super-register DW_OP_reg14 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp10-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 85 # super-register DW_OP_reg5 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc1: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 84 # DW_OP_reg4 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 83 # DW_OP_reg3 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 84 # DW_OP_reg4 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc2: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 1 # 1 + .byte 159 # DW_OP_stack_value + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp8-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 95 # DW_OP_reg15 + .byte 0 # DW_LLE_end_of_list +.Ldebug_list_header_end0: + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .ascii "\214\001" # DW_AT_loclists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 122 # DW_AT_call_all_calls + .byte 25 # DW_FORM_flag_present + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 11 # DW_TAG_lexical_block + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 6 # Abbreviation Code + .byte 72 # DW_TAG_call_site + .byte 0 # DW_CHILDREN_no + .byte 127 # DW_AT_call_origin + .byte 19 # DW_FORM_ref4 + .byte 125 # DW_AT_call_return_pc + .byte 27 # DW_FORM_addrx + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 7 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 5 # DW_FORM_data2 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 60 # DW_AT_declaration + .byte 25 # DW_FORM_flag_present + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 8 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 9 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 10 # Abbreviation Code + .byte 15 # DW_TAG_pointer_type + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 11 # Abbreviation Code + .byte 38 # DW_TAG_const_type + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x7f DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 29 # DW_AT_language + .byte 1 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .long .Laddr_table_base0 # DW_AT_addr_base + .long .Lloclists_table_base0 # DW_AT_loclists_base + .byte 2 # Abbrev [2] 0x27:0x38 DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + # DW_AT_call_all_calls + .byte 6 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + # DW_AT_prototyped + .long 110 # DW_AT_type + # DW_AT_external + .byte 3 # Abbrev [3] 0x36:0x9 DW_TAG_formal_parameter + .byte 0 # DW_AT_location + .byte 7 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + .long 110 # DW_AT_type + .byte 3 # Abbrev [3] 0x3f:0x9 DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 8 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + .long 128 # DW_AT_type + .byte 4 # Abbrev [4] 0x48:0x10 DW_TAG_lexical_block + .byte 0 # DW_AT_low_pc + .long .Ltmp8-.Lfunc_begin0 # DW_AT_high_pc + .byte 5 # Abbrev [5] 0x4e:0x9 DW_TAG_variable + .byte 2 # DW_AT_location + .byte 9 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 4 # DW_AT_decl_line + .long 110 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 6 # Abbrev [6] 0x58:0x6 DW_TAG_call_site + .long 95 # DW_AT_call_origin + .byte 1 # DW_AT_call_return_pc + .byte 0 # End Of Children Mark + .byte 7 # Abbrev [7] 0x5f:0xf DW_TAG_subprogram + .byte 3 # DW_AT_name + .byte 1 # DW_AT_decl_file + .short 661 # DW_AT_decl_line + # DW_AT_prototyped + .long 110 # DW_AT_type + # DW_AT_declaration + # DW_AT_external + .byte 8 # Abbrev [8] 0x68:0x5 DW_TAG_formal_parameter + .long 114 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 9 # Abbrev [9] 0x6e:0x4 DW_TAG_base_type + .byte 4 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 10 # Abbrev [10] 0x72:0x5 DW_TAG_pointer_type + .long 119 # DW_AT_type + .byte 11 # Abbrev [11] 0x77:0x5 DW_TAG_const_type + .long 124 # DW_AT_type + .byte 9 # Abbrev [9] 0x7c:0x4 DW_TAG_base_type + .byte 5 # DW_AT_name + .byte 6 # DW_AT_encoding + .byte 1 # DW_AT_byte_size + .byte 10 # Abbrev [10] 0x80:0x5 DW_TAG_pointer_type + .long 133 # DW_AT_type + .byte 10 # Abbrev [10] 0x85:0x5 DW_TAG_pointer_type + .long 124 # DW_AT_type + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str_offsets,"",@progbits + .long 44 # Length of String Offsets Set + .short 5 + .short 0 +.Lstr_offsets_base0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0 +.Linfo_string1: + .asciz "d_original_example.c" # string offset=119 +.Linfo_string2: + .asciz "." # string offset=140 +.Linfo_string3: + .asciz "puts" # string offset=142 +.Linfo_string4: + .asciz "int" # string offset=147 +.Linfo_string5: + .asciz "char" # string offset=151 +.Linfo_string6: + .asciz "main" # string offset=156 +.Linfo_string7: + .asciz "argc" # string offset=161 +.Linfo_string8: + .asciz "argv" # string offset=166 +.Linfo_string9: + .asciz "i" # string offset=171 + .section .debug_str_offsets,"",@progbits + .long .Linfo_string0 + .long .Linfo_string1 + .long .Linfo_string2 + .long .Linfo_string3 + .long .Linfo_string4 + .long .Linfo_string5 + .long .Linfo_string6 + .long .Linfo_string7 + .long .Linfo_string8 + .long .Linfo_string9 + .section .debug_addr,"",@progbits + .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution +.Ldebug_addr_start0: + .short 5 # DWARF version number + .byte 8 # Address size + .byte 0 # Segment selector size +.Laddr_table_base0: + .quad .Lfunc_begin0 + .quad .Ltmp5 +.Ldebug_addr_end0: + .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" + .section ".note.GNU-stack","",@progbits + .addrsig + .section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lldb/test/API/functionalities/disassembler-variables/live_across_call.s b/lldb/test/API/functionalities/disassembler-variables/live_across_call.s new file mode 100644 index 000000000000..cd9f08afe6fd --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/live_across_call.s @@ -0,0 +1,371 @@ +/* Original C (for context): +* // Declare a real external call so the compiler must respect ABI clobbers. +* extern int leaf(int) __attribute__((noinline)); +* +* __attribute__((noinline)) +* int live_across_call(int x) { +* volatile int a = x; // a starts in a GPR (from arg) +* asm volatile("" :: "r"(a)); // keep 'a' live in a register +* int r = leaf(a); // 'a' is live across the call +* asm volatile("" :: "r"(a), "r"(r));// still live afterwards +* return a + r; +* } +*/ + .file "live_across_call.c" + .text + .globl live_across_call # -- Begin function live_across_call + .p2align 4 + .type live_across_call,@function +live_across_call: # @live_across_call +.Lfunc_begin0: + .file 0 "." "live_across_call.c" md5 0x351c37295026edf0d468774d35f47e5e + .loc 0 5 0 # live_across_call.c:5:0 + .cfi_startproc +# %bb.0: # %entry + #DEBUG_VALUE: live_across_call:x <- $edi + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset %rbp, -16 + movq %rsp, %rbp + .cfi_def_cfa_register %rbp + subq $16, %rsp +.Ltmp0: + .loc 0 6 16 prologue_end # live_across_call.c:6:16 + movl %edi, -4(%rbp) + .loc 0 7 26 # live_across_call.c:7:26 + movl -4(%rbp), %eax + .loc 0 7 3 is_stmt 0 # live_across_call.c:7:3 + #APP + #NO_APP + .loc 0 8 16 is_stmt 1 # live_across_call.c:8:16 + movl -4(%rbp), %edi +.Ltmp1: + #DEBUG_VALUE: live_across_call:x <- [DW_OP_LLVM_entry_value 1] $edi + .loc 0 8 11 is_stmt 0 # live_across_call.c:8:11 + callq leaf@PLT +.Ltmp2: + #DEBUG_VALUE: live_across_call:r <- $eax + .loc 0 9 26 is_stmt 1 # live_across_call.c:9:26 + movl -4(%rbp), %ecx + .loc 0 9 3 is_stmt 0 # live_across_call.c:9:3 + #APP + #NO_APP + .loc 0 10 12 is_stmt 1 # live_across_call.c:10:12 + addl -4(%rbp), %eax +.Ltmp3: + .loc 0 10 3 epilogue_begin is_stmt 0 # live_across_call.c:10:3 + addq $16, %rsp + popq %rbp + .cfi_def_cfa %rsp, 8 + retq +.Ltmp4: +.Lfunc_end0: + .size live_across_call, .Lfunc_end0-live_across_call + .cfi_endproc + # -- End function + .section .debug_loclists,"",@progbits + .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length +.Ldebug_list_header_start0: + .short 5 # Version + .byte 8 # Address size + .byte 0 # Segment selector size + .long 2 # Offset entry count +.Lloclists_table_base0: + .long .Ldebug_loc0-.Lloclists_table_base0 + .long .Ldebug_loc1-.Lloclists_table_base0 +.Ldebug_loc0: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 85 # super-register DW_OP_reg5 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 85 # super-register DW_OP_reg5 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc1: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp2-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp3-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 80 # super-register DW_OP_reg0 + .byte 0 # DW_LLE_end_of_list +.Ldebug_list_header_end0: + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .ascii "\214\001" # DW_AT_loclists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 122 # DW_AT_call_all_calls + .byte 25 # DW_FORM_flag_present + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 6 # Abbreviation Code + .byte 72 # DW_TAG_call_site + .byte 0 # DW_CHILDREN_no + .byte 127 # DW_AT_call_origin + .byte 19 # DW_FORM_ref4 + .byte 125 # DW_AT_call_return_pc + .byte 27 # DW_FORM_addrx + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 7 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 60 # DW_AT_declaration + .byte 25 # DW_FORM_flag_present + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 8 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 9 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 10 # Abbreviation Code + .byte 53 # DW_TAG_volatile_type + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x66 DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 29 # DW_AT_language + .byte 1 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .long .Laddr_table_base0 # DW_AT_addr_base + .long .Lloclists_table_base0 # DW_AT_loclists_base + .byte 2 # Abbrev [2] 0x27:0x33 DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + # DW_AT_call_all_calls + .byte 5 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 5 # DW_AT_decl_line + # DW_AT_prototyped + .long 104 # DW_AT_type + # DW_AT_external + .byte 3 # Abbrev [3] 0x36:0x9 DW_TAG_formal_parameter + .byte 0 # DW_AT_location + .byte 7 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 5 # DW_AT_decl_line + .long 104 # DW_AT_type + .byte 4 # Abbrev [4] 0x3f:0xb DW_TAG_variable + .byte 2 # DW_AT_location + .byte 145 + .byte 124 + .byte 6 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 6 # DW_AT_decl_line + .long 108 # DW_AT_type + .byte 5 # Abbrev [5] 0x4a:0x9 DW_TAG_variable + .byte 1 # DW_AT_location + .byte 8 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 8 # DW_AT_decl_line + .long 104 # DW_AT_type + .byte 6 # Abbrev [6] 0x53:0x6 DW_TAG_call_site + .long 90 # DW_AT_call_origin + .byte 1 # DW_AT_call_return_pc + .byte 0 # End Of Children Mark + .byte 7 # Abbrev [7] 0x5a:0xe DW_TAG_subprogram + .byte 3 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + # DW_AT_prototyped + .long 104 # DW_AT_type + # DW_AT_declaration + # DW_AT_external + .byte 8 # Abbrev [8] 0x62:0x5 DW_TAG_formal_parameter + .long 104 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 9 # Abbrev [9] 0x68:0x4 DW_TAG_base_type + .byte 4 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 10 # Abbrev [10] 0x6c:0x5 DW_TAG_volatile_type + .long 104 # DW_AT_type + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str_offsets,"",@progbits + .long 40 # Length of String Offsets Set + .short 5 + .short 0 +.Lstr_offsets_base0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0 +.Linfo_string1: + .asciz "live_across_call.c" # string offset=119 +.Linfo_string2: + .asciz "." # string offset=138 +.Linfo_string3: + .asciz "leaf" # string offset=140 +.Linfo_string4: + .asciz "int" # string offset=145 +.Linfo_string5: + .asciz "live_across_call" # string offset=149 +.Linfo_string6: + .asciz "a" # string offset=166 +.Linfo_string7: + .asciz "x" # string offset=168 +.Linfo_string8: + .asciz "r" # string offset=170 + .section .debug_str_offsets,"",@progbits + .long .Linfo_string0 + .long .Linfo_string1 + .long .Linfo_string2 + .long .Linfo_string3 + .long .Linfo_string4 + .long .Linfo_string5 + .long .Linfo_string6 + .long .Linfo_string7 + .long .Linfo_string8 + .section .debug_addr,"",@progbits + .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution +.Ldebug_addr_start0: + .short 5 # DWARF version number + .byte 8 # Address size + .byte 0 # Segment selector size +.Laddr_table_base0: + .quad .Lfunc_begin0 + .quad .Ltmp2 +.Ldebug_addr_end0: + .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" + .section ".note.GNU-stack","",@progbits + .addrsig + .section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s b/lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s new file mode 100644 index 000000000000..c01e2b28fd2b --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/loop_reg_rotate.s @@ -0,0 +1,557 @@ +/* Original C (for context): +* __attribute__((noinline)) +* int loop_reg_rotate(int n, int seed) { +* volatile int acc = seed; // keep as a named local +* int i = 0, j = 1, k = 2; // extra pressure but not enough to spill +* +* for (int t = 0; t < n; ++t) { +* // Mix uses so the allocator may reshuffle regs for 'acc' +* acc = acc + i; +* asm volatile("" :: "r"(acc)); // pin 'acc' live here +* acc = acc ^ j; +* asm volatile("" :: "r"(acc)); // and here +* acc = acc + k; +* i ^= acc; j += acc; k ^= j; +* } +* +* asm volatile("" :: "r"(acc)); +* return acc + i + j + k; +* } +*/ + .file "loop_reg_rotate.c" + .text + .globl loop_reg_rotate # -- Begin function loop_reg_rotate + .p2align 4 + .type loop_reg_rotate,@function +loop_reg_rotate: # @loop_reg_rotate +.Lfunc_begin0: + .file 0 "." "loop_reg_rotate.c" md5 0x388f52de76e9442230e689fb9be1b4ef + .loc 0 2 0 # loop_reg_rotate.c:2:0 + .cfi_startproc +# %bb.0: # %entry + #DEBUG_VALUE: loop_reg_rotate:n <- $edi + #DEBUG_VALUE: loop_reg_rotate:seed <- $esi + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset %rbp, -16 + movq %rsp, %rbp + .cfi_def_cfa_register %rbp +.Ltmp0: + .loc 0 3 16 prologue_end # loop_reg_rotate.c:3:16 + movl %esi, -4(%rbp) +.Ltmp1: + #DEBUG_VALUE: loop_reg_rotate:i <- 0 + #DEBUG_VALUE: loop_reg_rotate:j <- 1 + #DEBUG_VALUE: loop_reg_rotate:k <- 2 + #DEBUG_VALUE: t <- 0 + .loc 0 6 21 # loop_reg_rotate.c:6:21 + testl %edi, %edi +.Ltmp2: + .loc 0 6 3 is_stmt 0 # loop_reg_rotate.c:6:3 + jle .LBB0_1 +.Ltmp3: +# %bb.3: # %for.body.preheader + #DEBUG_VALUE: loop_reg_rotate:n <- $edi + #DEBUG_VALUE: loop_reg_rotate:seed <- $esi + #DEBUG_VALUE: loop_reg_rotate:i <- 0 + #DEBUG_VALUE: loop_reg_rotate:j <- 1 + #DEBUG_VALUE: loop_reg_rotate:k <- 2 + #DEBUG_VALUE: t <- 0 + .loc 0 0 3 # loop_reg_rotate.c:0:3 + xorl %eax, %eax + movl $1, %edx + movl $2, %ecx +.Ltmp4: + .p2align 4 +.LBB0_4: # %for.body + # =>This Inner Loop Header: Depth=1 + #DEBUG_VALUE: loop_reg_rotate:n <- [DW_OP_LLVM_entry_value 1] $edi + #DEBUG_VALUE: loop_reg_rotate:seed <- [DW_OP_LLVM_entry_value 1] $esi + #DEBUG_VALUE: t <- [DW_OP_LLVM_arg 0, DW_OP_LLVM_arg 1, DW_OP_minus, DW_OP_consts 18446744073709551615, DW_OP_div, DW_OP_stack_value] undef, undef + #DEBUG_VALUE: loop_reg_rotate:k <- $ecx + #DEBUG_VALUE: loop_reg_rotate:j <- $edx + #DEBUG_VALUE: loop_reg_rotate:i <- $eax + .loc 0 8 9 is_stmt 1 # loop_reg_rotate.c:8:9 + addl %eax, -4(%rbp) + .loc 0 9 28 # loop_reg_rotate.c:9:28 + movl -4(%rbp), %esi + .loc 0 9 5 is_stmt 0 # loop_reg_rotate.c:9:5 + #APP + #NO_APP + .loc 0 10 9 is_stmt 1 # loop_reg_rotate.c:10:9 + xorl %edx, -4(%rbp) + .loc 0 11 28 # loop_reg_rotate.c:11:28 + movl -4(%rbp), %esi + .loc 0 11 5 is_stmt 0 # loop_reg_rotate.c:11:5 + #APP + #NO_APP + .loc 0 12 9 is_stmt 1 # loop_reg_rotate.c:12:9 + addl %ecx, -4(%rbp) + .loc 0 13 7 # loop_reg_rotate.c:13:7 + xorl -4(%rbp), %eax +.Ltmp5: + #DEBUG_VALUE: loop_reg_rotate:i <- $eax + .loc 0 13 17 is_stmt 0 # loop_reg_rotate.c:13:17 + addl -4(%rbp), %edx +.Ltmp6: + #DEBUG_VALUE: loop_reg_rotate:j <- $edx + .loc 0 13 27 # loop_reg_rotate.c:13:27 + xorl %edx, %ecx +.Ltmp7: + #DEBUG_VALUE: loop_reg_rotate:k <- $ecx + #DEBUG_VALUE: t <- [DW_OP_LLVM_arg 0, DW_OP_LLVM_arg 1, DW_OP_minus, DW_OP_consts 18446744073709551615, DW_OP_div, DW_OP_consts 1, DW_OP_plus, DW_OP_stack_value] undef, undef + .loc 0 6 21 is_stmt 1 # loop_reg_rotate.c:6:21 + decl %edi +.Ltmp8: + .loc 0 6 3 is_stmt 0 # loop_reg_rotate.c:6:3 + jne .LBB0_4 + jmp .LBB0_2 +.Ltmp9: +.LBB0_1: + #DEBUG_VALUE: loop_reg_rotate:n <- $edi + #DEBUG_VALUE: loop_reg_rotate:seed <- $esi + #DEBUG_VALUE: loop_reg_rotate:i <- 0 + #DEBUG_VALUE: loop_reg_rotate:j <- 1 + #DEBUG_VALUE: loop_reg_rotate:k <- 2 + #DEBUG_VALUE: t <- 0 + .loc 0 0 3 # loop_reg_rotate.c:0:3 + movl $2, %ecx + movl $1, %edx + xorl %eax, %eax +.Ltmp10: +.LBB0_2: # %for.cond.cleanup + #DEBUG_VALUE: loop_reg_rotate:n <- [DW_OP_LLVM_entry_value 1] $edi + #DEBUG_VALUE: loop_reg_rotate:seed <- [DW_OP_LLVM_entry_value 1] $esi + .loc 0 16 26 is_stmt 1 # loop_reg_rotate.c:16:26 + movl -4(%rbp), %esi + .loc 0 16 3 is_stmt 0 # loop_reg_rotate.c:16:3 + #APP + #NO_APP + .loc 0 17 14 is_stmt 1 # loop_reg_rotate.c:17:14 + addl %edx, %eax + .loc 0 17 18 is_stmt 0 # loop_reg_rotate.c:17:18 + addl %ecx, %eax + .loc 0 17 22 # loop_reg_rotate.c:17:22 + addl -4(%rbp), %eax + .loc 0 17 3 epilogue_begin # loop_reg_rotate.c:17:3 + popq %rbp + .cfi_def_cfa %rsp, 8 + retq +.Ltmp11: +.Lfunc_end0: + .size loop_reg_rotate, .Lfunc_end0-loop_reg_rotate + .cfi_endproc + # -- End function + .section .debug_loclists,"",@progbits + .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length +.Ldebug_list_header_start0: + .short 5 # Version + .byte 8 # Address size + .byte 0 # Segment selector size + .long 6 # Offset entry count +.Lloclists_table_base0: + .long .Ldebug_loc0-.Lloclists_table_base0 + .long .Ldebug_loc1-.Lloclists_table_base0 + .long .Ldebug_loc2-.Lloclists_table_base0 + .long .Ldebug_loc3-.Lloclists_table_base0 + .long .Ldebug_loc4-.Lloclists_table_base0 + .long .Ldebug_loc5-.Lloclists_table_base0 +.Ldebug_loc0: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 85 # super-register DW_OP_reg5 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 85 # super-register DW_OP_reg5 + .byte 159 # DW_OP_stack_value + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp10-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 85 # super-register DW_OP_reg5 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp10-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 85 # super-register DW_OP_reg5 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc1: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 84 # super-register DW_OP_reg4 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 84 # super-register DW_OP_reg4 + .byte 159 # DW_OP_stack_value + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp10-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 84 # super-register DW_OP_reg4 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp10-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 84 # super-register DW_OP_reg4 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc2: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 0 # 0 + .byte 159 # DW_OP_stack_value + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 80 # super-register DW_OP_reg0 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp10-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 0 # 0 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc3: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 1 # 1 + .byte 159 # DW_OP_stack_value + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 81 # super-register DW_OP_reg1 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp10-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 1 # 1 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc4: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 2 # 2 + .byte 159 # DW_OP_stack_value + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp4-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp9-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 82 # super-register DW_OP_reg2 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp9-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp10-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 2 # 2 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc5: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp4-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 0 # 0 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_list_header_end0: + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .ascii "\214\001" # DW_AT_loclists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 122 # DW_AT_call_all_calls + .byte 25 # DW_FORM_flag_present + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 6 # Abbreviation Code + .byte 11 # DW_TAG_lexical_block + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 7 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 8 # Abbreviation Code + .byte 53 # DW_TAG_volatile_type + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x7d DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 29 # DW_AT_language + .byte 1 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .long .Laddr_table_base0 # DW_AT_addr_base + .long .Lloclists_table_base0 # DW_AT_loclists_base + .byte 2 # Abbrev [2] 0x27:0x58 DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + # DW_AT_call_all_calls + .byte 3 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + # DW_AT_prototyped + .long 127 # DW_AT_type + # DW_AT_external + .byte 3 # Abbrev [3] 0x36:0x9 DW_TAG_formal_parameter + .byte 0 # DW_AT_location + .byte 6 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 127 # DW_AT_type + .byte 3 # Abbrev [3] 0x3f:0x9 DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 7 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 127 # DW_AT_type + .byte 4 # Abbrev [4] 0x48:0xb DW_TAG_variable + .byte 2 # DW_AT_location + .byte 145 + .byte 124 + .byte 5 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + .long 131 # DW_AT_type + .byte 5 # Abbrev [5] 0x53:0x9 DW_TAG_variable + .byte 2 # DW_AT_location + .byte 8 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 4 # DW_AT_decl_line + .long 127 # DW_AT_type + .byte 5 # Abbrev [5] 0x5c:0x9 DW_TAG_variable + .byte 3 # DW_AT_location + .byte 9 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 4 # DW_AT_decl_line + .long 127 # DW_AT_type + .byte 5 # Abbrev [5] 0x65:0x9 DW_TAG_variable + .byte 4 # DW_AT_location + .byte 10 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 4 # DW_AT_decl_line + .long 127 # DW_AT_type + .byte 6 # Abbrev [6] 0x6e:0x10 DW_TAG_lexical_block + .byte 1 # DW_AT_low_pc + .long .Ltmp9-.Ltmp1 # DW_AT_high_pc + .byte 5 # Abbrev [5] 0x74:0x9 DW_TAG_variable + .byte 5 # DW_AT_location + .byte 11 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 6 # DW_AT_decl_line + .long 127 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 0 # End Of Children Mark + .byte 7 # Abbrev [7] 0x7f:0x4 DW_TAG_base_type + .byte 4 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 8 # Abbrev [8] 0x83:0x5 DW_TAG_volatile_type + .long 127 # DW_AT_type + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str_offsets,"",@progbits + .long 52 # Length of String Offsets Set + .short 5 + .short 0 +.Lstr_offsets_base0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0 +.Linfo_string1: + .asciz "loop_reg_rotate.c" # string offset=119 +.Linfo_string2: + .asciz "." # string offset=137 +.Linfo_string3: + .asciz "loop_reg_rotate" # string offset=139 +.Linfo_string4: + .asciz "int" # string offset=155 +.Linfo_string5: + .asciz "acc" # string offset=159 +.Linfo_string6: + .asciz "n" # string offset=163 +.Linfo_string7: + .asciz "seed" # string offset=165 +.Linfo_string8: + .asciz "i" # string offset=170 +.Linfo_string9: + .asciz "j" # string offset=172 +.Linfo_string10: + .asciz "k" # string offset=174 +.Linfo_string11: + .asciz "t" # string offset=176 + .section .debug_str_offsets,"",@progbits + .long .Linfo_string0 + .long .Linfo_string1 + .long .Linfo_string2 + .long .Linfo_string3 + .long .Linfo_string4 + .long .Linfo_string5 + .long .Linfo_string6 + .long .Linfo_string7 + .long .Linfo_string8 + .long .Linfo_string9 + .long .Linfo_string10 + .long .Linfo_string11 + .section .debug_addr,"",@progbits + .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution +.Ldebug_addr_start0: + .short 5 # DWARF version number + .byte 8 # Address size + .byte 0 # Segment selector size +.Laddr_table_base0: + .quad .Lfunc_begin0 + .quad .Ltmp1 +.Ldebug_addr_end0: + .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" + .section ".note.GNU-stack","",@progbits + .addrsig + .section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s b/lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s new file mode 100644 index 000000000000..502ab151e0c5 --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/regs_fp_params.s @@ -0,0 +1,304 @@ +/* Original C (for context): +* __attribute__((noinline)) +* double regs_fp_params(double a, double b, double c, double d, double e, double f) { +* asm volatile("" :: "x"(a), "x"(b), "x"(c), "x"(d), "x"(e), "x"(f)); +* return a + b + c + d + e + f; +* }*/ + .file "regs_fp_params.c" + .text + .globl regs_fp_params # -- Begin function regs_fp_params + .p2align 4 + .type regs_fp_params,@function +regs_fp_params: # @regs_fp_params +.Lfunc_begin0: + .file 0 "." "regs_fp_params.c" md5 0xdd883927454b0ea1cdce7b3c16c6a643 + .loc 0 2 0 # regs_fp_params.c:2:0 + .cfi_startproc +# %bb.0: # %entry + #DEBUG_VALUE: regs_fp_params:a <- $xmm0 + #DEBUG_VALUE: regs_fp_params:b <- $xmm1 + #DEBUG_VALUE: regs_fp_params:c <- $xmm2 + #DEBUG_VALUE: regs_fp_params:d <- $xmm3 + #DEBUG_VALUE: regs_fp_params:e <- $xmm4 + #DEBUG_VALUE: regs_fp_params:f <- $xmm5 + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset %rbp, -16 + movq %rsp, %rbp + .cfi_def_cfa_register %rbp +.Ltmp0: + .loc 0 3 3 prologue_end # regs_fp_params.c:3:3 + #APP + #NO_APP + .loc 0 4 12 # regs_fp_params.c:4:12 + addsd %xmm1, %xmm0 +.Ltmp1: + #DEBUG_VALUE: regs_fp_params:a <- [DW_OP_LLVM_entry_value 1] $xmm0 + .loc 0 4 16 is_stmt 0 # regs_fp_params.c:4:16 + addsd %xmm2, %xmm0 + .loc 0 4 20 # regs_fp_params.c:4:20 + addsd %xmm3, %xmm0 + .loc 0 4 24 # regs_fp_params.c:4:24 + addsd %xmm4, %xmm0 + .loc 0 4 28 # regs_fp_params.c:4:28 + addsd %xmm5, %xmm0 + .loc 0 4 3 epilogue_begin # regs_fp_params.c:4:3 + popq %rbp + .cfi_def_cfa %rsp, 8 + retq +.Ltmp2: +.Lfunc_end0: + .size regs_fp_params, .Lfunc_end0-regs_fp_params + .cfi_endproc + # -- End function + .section .debug_loclists,"",@progbits + .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length +.Ldebug_list_header_start0: + .short 5 # Version + .byte 8 # Address size + .byte 0 # Segment selector size + .long 1 # Offset entry count +.Lloclists_table_base0: + .long .Ldebug_loc0-.Lloclists_table_base0 +.Ldebug_loc0: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 97 # DW_OP_reg17 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 97 # DW_OP_reg17 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_list_header_end0: + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .ascii "\214\001" # DW_AT_loclists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 122 # DW_AT_call_all_calls + .byte 25 # DW_FORM_flag_present + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x6b DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 29 # DW_AT_language + .byte 1 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .long .Laddr_table_base0 # DW_AT_addr_base + .long .Lloclists_table_base0 # DW_AT_loclists_base + .byte 2 # Abbrev [2] 0x27:0x4b DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + # DW_AT_call_all_calls + .byte 3 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + # DW_AT_prototyped + .long 114 # DW_AT_type + # DW_AT_external + .byte 3 # Abbrev [3] 0x36:0x9 DW_TAG_formal_parameter + .byte 0 # DW_AT_location + .byte 5 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 4 # Abbrev [4] 0x3f:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 98 + .byte 6 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 4 # Abbrev [4] 0x49:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 99 + .byte 7 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 4 # Abbrev [4] 0x53:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 100 + .byte 8 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 4 # Abbrev [4] 0x5d:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 101 + .byte 9 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 4 # Abbrev [4] 0x67:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 102 + .byte 10 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 5 # Abbrev [5] 0x72:0x4 DW_TAG_base_type + .byte 4 # DW_AT_name + .byte 4 # DW_AT_encoding + .byte 8 # DW_AT_byte_size + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str_offsets,"",@progbits + .long 48 # Length of String Offsets Set + .short 5 + .short 0 +.Lstr_offsets_base0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0 +.Linfo_string1: + .asciz "regs_fp_params.c" # string offset=119 +.Linfo_string2: + .asciz "." # string offset=136 +.Linfo_string3: + .asciz "regs_fp_params" # string offset=138 +.Linfo_string4: + .asciz "double" # string offset=153 +.Linfo_string5: + .asciz "a" # string offset=160 +.Linfo_string6: + .asciz "b" # string offset=162 +.Linfo_string7: + .asciz "c" # string offset=164 +.Linfo_string8: + .asciz "d" # string offset=166 +.Linfo_string9: + .asciz "e" # string offset=168 +.Linfo_string10: + .asciz "f" # string offset=170 + .section .debug_str_offsets,"",@progbits + .long .Linfo_string0 + .long .Linfo_string1 + .long .Linfo_string2 + .long .Linfo_string3 + .long .Linfo_string4 + .long .Linfo_string5 + .long .Linfo_string6 + .long .Linfo_string7 + .long .Linfo_string8 + .long .Linfo_string9 + .long .Linfo_string10 + .section .debug_addr,"",@progbits + .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution +.Ldebug_addr_start0: + .short 5 # DWARF version number + .byte 8 # Address size + .byte 0 # Segment selector size +.Laddr_table_base0: + .quad .Lfunc_begin0 +.Ldebug_addr_end0: + .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" + .section ".note.GNU-stack","",@progbits + .addrsig + .section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lldb/test/API/functionalities/disassembler-variables/regs_int_params.s b/lldb/test/API/functionalities/disassembler-variables/regs_int_params.s new file mode 100644 index 000000000000..0b2a60e2b4d5 --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/regs_int_params.s @@ -0,0 +1,312 @@ +/* Original C (for context): +* __attribute__((noinline)) +* int regs_int_params(int a, int b, int c, int d, int e, int f) { +* // Keep all params in regs; avoid spilling to the stack. +* // The compiler will usually keep a..f in the 6 integer-arg regs. +* asm volatile("" :: "r"(a), "r"(b), "r"(c), "r"(d), "r"(e), "r"(f)); +* return a + b + c + d + e + f; +* } +*/ + .file "regs_int_params.c" + .text + .globl regs_int_params # -- Begin function regs_int_params + .p2align 4 + .type regs_int_params,@function +regs_int_params: # @regs_int_params +.Lfunc_begin0: + .file 0 "." "regs_int_params.c" md5 0xcf39432098ab893043cc8b4606354bd2 + .loc 0 2 0 # regs_int_params.c:2:0 + .cfi_startproc +# %bb.0: # %entry + #DEBUG_VALUE: regs_int_params:a <- $edi + #DEBUG_VALUE: regs_int_params:b <- $esi + #DEBUG_VALUE: regs_int_params:c <- $edx + #DEBUG_VALUE: regs_int_params:d <- $ecx + #DEBUG_VALUE: regs_int_params:e <- $r8d + #DEBUG_VALUE: regs_int_params:f <- $r9d + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset %rbp, -16 + movq %rsp, %rbp + .cfi_def_cfa_register %rbp + # kill: def $r9d killed $r9d def $r9 + # kill: def $r8d killed $r8d def $r8 + # kill: def $ecx killed $ecx def $rcx + # kill: def $edx killed $edx def $rdx + # kill: def $esi killed $esi def $rsi + # kill: def $edi killed $edi def $rdi +.Ltmp0: + .loc 0 5 3 prologue_end # regs_int_params.c:5:3 + #APP + #NO_APP + .loc 0 6 12 # regs_int_params.c:6:12 + addl %edi, %esi +.Ltmp1: + #DEBUG_VALUE: regs_int_params:b <- [DW_OP_LLVM_entry_value 1] $esi + .loc 0 6 16 is_stmt 0 # regs_int_params.c:6:16 + leal (%rdx,%rcx), %eax + .loc 0 6 20 # regs_int_params.c:6:20 + addl %esi, %eax + .loc 0 6 28 # regs_int_params.c:6:28 + addl %r8d, %eax + addl %r9d, %eax + .loc 0 6 3 epilogue_begin # regs_int_params.c:6:3 + popq %rbp + .cfi_def_cfa %rsp, 8 + retq +.Ltmp2: +.Lfunc_end0: + .size regs_int_params, .Lfunc_end0-regs_int_params + .cfi_endproc + # -- End function + .section .debug_loclists,"",@progbits + .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length +.Ldebug_list_header_start0: + .short 5 # Version + .byte 8 # Address size + .byte 0 # Segment selector size + .long 1 # Offset entry count +.Lloclists_table_base0: + .long .Ldebug_loc0-.Lloclists_table_base0 +.Ldebug_loc0: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 84 # super-register DW_OP_reg4 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 84 # super-register DW_OP_reg4 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_list_header_end0: + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .ascii "\214\001" # DW_AT_loclists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 122 # DW_AT_call_all_calls + .byte 25 # DW_FORM_flag_present + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x6b DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 29 # DW_AT_language + .byte 1 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .long .Laddr_table_base0 # DW_AT_addr_base + .long .Lloclists_table_base0 # DW_AT_loclists_base + .byte 2 # Abbrev [2] 0x27:0x4b DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + # DW_AT_call_all_calls + .byte 3 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + # DW_AT_prototyped + .long 114 # DW_AT_type + # DW_AT_external + .byte 3 # Abbrev [3] 0x36:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 85 + .byte 5 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 4 # Abbrev [4] 0x40:0x9 DW_TAG_formal_parameter + .byte 0 # DW_AT_location + .byte 6 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 3 # Abbrev [3] 0x49:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 81 + .byte 7 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 3 # Abbrev [3] 0x53:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 82 + .byte 8 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 3 # Abbrev [3] 0x5d:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 88 + .byte 9 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 3 # Abbrev [3] 0x67:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 89 + .byte 10 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 114 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 5 # Abbrev [5] 0x72:0x4 DW_TAG_base_type + .byte 4 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str_offsets,"",@progbits + .long 48 # Length of String Offsets Set + .short 5 + .short 0 +.Lstr_offsets_base0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0 +.Linfo_string1: + .asciz "regs_int_params.c" # string offset=119 +.Linfo_string2: + .asciz "." # string offset=137 +.Linfo_string3: + .asciz "regs_int_params" # string offset=139 +.Linfo_string4: + .asciz "int" # string offset=155 +.Linfo_string5: + .asciz "a" # string offset=159 +.Linfo_string6: + .asciz "b" # string offset=161 +.Linfo_string7: + .asciz "c" # string offset=163 +.Linfo_string8: + .asciz "d" # string offset=165 +.Linfo_string9: + .asciz "e" # string offset=167 +.Linfo_string10: + .asciz "f" # string offset=169 + .section .debug_str_offsets,"",@progbits + .long .Linfo_string0 + .long .Linfo_string1 + .long .Linfo_string2 + .long .Linfo_string3 + .long .Linfo_string4 + .long .Linfo_string5 + .long .Linfo_string6 + .long .Linfo_string7 + .long .Linfo_string8 + .long .Linfo_string9 + .long .Linfo_string10 + .section .debug_addr,"",@progbits + .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution +.Ldebug_addr_start0: + .short 5 # DWARF version number + .byte 8 # Address size + .byte 0 # Segment selector size +.Laddr_table_base0: + .quad .Lfunc_begin0 +.Ldebug_addr_end0: + .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" + .section ".note.GNU-stack","",@progbits + .addrsig + .section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s b/lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s new file mode 100644 index 000000000000..691180b42f24 --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/regs_mixed_params.s @@ -0,0 +1,375 @@ +/* Original C (for context): +* __attribute__((noinline)) +* double regs_mixed_params(int a, int b, double x, double y, int c, double z) { +* // Keep everything live; avoid spills. +* asm volatile("" :: "r"(a), "r"(b), "x"(x), "x"(y), "r"(c), "x"(z)); +* // Some mixing so values stay in regs long enough to annotate. +* double r = (double)(a + b + c) + x + y + z; +* asm volatile("" :: "x"(r), "r"(a), "x"(x)); +* return r; +* } +*/ + .file "regs_mixed_params.c" + .file 0 "." "regs_mixed_params.c" md5 0x73c4bda40238ae460aaecb3a6a2603cf + .text + .globl regs_mixed_params # -- Begin function regs_mixed_params + .p2align 4 + .type regs_mixed_params,@function +regs_mixed_params: # @regs_mixed_params +.Lfunc_begin0: + .loc 0 2 0 # regs_mixed_params.c:2:0 + .cfi_startproc +# %bb.0: # %entry + #DEBUG_VALUE: regs_mixed_params:a <- $edi + #DEBUG_VALUE: regs_mixed_params:b <- $esi + #DEBUG_VALUE: regs_mixed_params:x <- $xmm0 + #DEBUG_VALUE: regs_mixed_params:y <- $xmm1 + #DEBUG_VALUE: regs_mixed_params:c <- $edx + #DEBUG_VALUE: regs_mixed_params:z <- $xmm2 + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset %rbp, -16 + movq %rsp, %rbp + .cfi_def_cfa_register %rbp +.Ltmp0: + .loc 0 4 3 prologue_end # regs_mixed_params.c:4:3 + #APP + #NO_APP + .loc 0 6 25 # regs_mixed_params.c:6:25 + addl %edi, %esi +.Ltmp1: + #DEBUG_VALUE: regs_mixed_params:b <- [DW_OP_LLVM_entry_value 1] $esi + .loc 0 6 29 is_stmt 0 # regs_mixed_params.c:6:29 + addl %edx, %esi + .loc 0 6 14 # regs_mixed_params.c:6:14 + cvtsi2sd %esi, %xmm4 + .loc 0 6 34 # regs_mixed_params.c:6:34 + movapd %xmm0, %xmm3 + addsd %xmm4, %xmm3 + .loc 0 6 38 # regs_mixed_params.c:6:38 + addsd %xmm1, %xmm3 + .loc 0 6 42 # regs_mixed_params.c:6:42 + addsd %xmm2, %xmm3 +.Ltmp2: + #DEBUG_VALUE: regs_mixed_params:r <- $xmm3 + .loc 0 7 3 is_stmt 1 # regs_mixed_params.c:7:3 + #APP + #NO_APP + .loc 0 8 3 # regs_mixed_params.c:8:3 + movapd %xmm3, %xmm0 +.Ltmp3: + #DEBUG_VALUE: regs_mixed_params:x <- [DW_OP_LLVM_entry_value 1] $xmm0 + .loc 0 8 3 epilogue_begin is_stmt 0 # regs_mixed_params.c:8:3 + popq %rbp + .cfi_def_cfa %rsp, 8 + retq +.Ltmp4: +.Lfunc_end0: + .size regs_mixed_params, .Lfunc_end0-regs_mixed_params + .cfi_endproc + # -- End function + .section .debug_loclists,"",@progbits + .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length +.Ldebug_list_header_start0: + .short 5 # Version + .byte 8 # Address size + .byte 0 # Segment selector size + .long 3 # Offset entry count +.Lloclists_table_base0: + .long .Ldebug_loc0-.Lloclists_table_base0 + .long .Ldebug_loc1-.Lloclists_table_base0 + .long .Ldebug_loc2-.Lloclists_table_base0 +.Ldebug_loc0: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 84 # super-register DW_OP_reg4 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 84 # super-register DW_OP_reg4 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc1: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp3-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 97 # DW_OP_reg17 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp3-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 4 # Loc expr size + .byte 163 # DW_OP_entry_value + .byte 1 # 1 + .byte 97 # DW_OP_reg17 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_loc2: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp2-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 100 # DW_OP_reg20 + .byte 0 # DW_LLE_end_of_list +.Ldebug_list_header_end0: + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .ascii "\214\001" # DW_AT_loclists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 122 # DW_AT_call_all_calls + .byte 25 # DW_FORM_flag_present + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 6 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x77 DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 29 # DW_AT_language + .byte 1 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .long .Laddr_table_base0 # DW_AT_addr_base + .long .Lloclists_table_base0 # DW_AT_loclists_base + .byte 2 # Abbrev [2] 0x27:0x4 DW_TAG_base_type + .byte 3 # DW_AT_name + .byte 4 # DW_AT_encoding + .byte 8 # DW_AT_byte_size + .byte 3 # Abbrev [3] 0x2b:0x53 DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + # DW_AT_call_all_calls + .byte 4 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + # DW_AT_prototyped + .long 39 # DW_AT_type + # DW_AT_external + .byte 4 # Abbrev [4] 0x3a:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 85 + .byte 5 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 126 # DW_AT_type + .byte 5 # Abbrev [5] 0x44:0x9 DW_TAG_formal_parameter + .byte 0 # DW_AT_location + .byte 7 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 126 # DW_AT_type + .byte 5 # Abbrev [5] 0x4d:0x9 DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 8 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 39 # DW_AT_type + .byte 4 # Abbrev [4] 0x56:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 98 + .byte 9 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 39 # DW_AT_type + .byte 4 # Abbrev [4] 0x60:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 81 + .byte 10 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 126 # DW_AT_type + .byte 4 # Abbrev [4] 0x6a:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 99 + .byte 11 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 2 # DW_AT_decl_line + .long 39 # DW_AT_type + .byte 6 # Abbrev [6] 0x74:0x9 DW_TAG_variable + .byte 2 # DW_AT_location + .byte 12 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 6 # DW_AT_decl_line + .long 39 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 2 # Abbrev [2] 0x7e:0x4 DW_TAG_base_type + .byte 6 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str_offsets,"",@progbits + .long 56 # Length of String Offsets Set + .short 5 + .short 0 +.Lstr_offsets_base0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0 +.Linfo_string1: + .asciz "regs_mixed_params.c" # string offset=119 +.Linfo_string2: + .asciz "." # string offset=139 +.Linfo_string3: + .asciz "double" # string offset=141 +.Linfo_string4: + .asciz "regs_mixed_params" # string offset=148 +.Linfo_string5: + .asciz "a" # string offset=166 +.Linfo_string6: + .asciz "int" # string offset=168 +.Linfo_string7: + .asciz "b" # string offset=172 +.Linfo_string8: + .asciz "x" # string offset=174 +.Linfo_string9: + .asciz "y" # string offset=176 +.Linfo_string10: + .asciz "c" # string offset=178 +.Linfo_string11: + .asciz "z" # string offset=180 +.Linfo_string12: + .asciz "r" # string offset=182 + .section .debug_str_offsets,"",@progbits + .long .Linfo_string0 + .long .Linfo_string1 + .long .Linfo_string2 + .long .Linfo_string3 + .long .Linfo_string4 + .long .Linfo_string5 + .long .Linfo_string6 + .long .Linfo_string7 + .long .Linfo_string8 + .long .Linfo_string9 + .long .Linfo_string10 + .long .Linfo_string11 + .long .Linfo_string12 + .section .debug_addr,"",@progbits + .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution +.Ldebug_addr_start0: + .short 5 # DWARF version number + .byte 8 # Address size + .byte 0 # Segment selector size +.Laddr_table_base0: + .quad .Lfunc_begin0 +.Ldebug_addr_end0: + .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" + .section ".note.GNU-stack","",@progbits + .addrsig + .section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s b/lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s new file mode 100644 index 000000000000..f85b8a712cbb --- /dev/null +++ b/lldb/test/API/functionalities/disassembler-variables/seed_reg_const_undef.s @@ -0,0 +1,289 @@ +/* Original C (for context): +* __attribute__((noinline)) +* int main(int argc, char **argv) { +* int i = argc; // i in a reg (DW_OP_regN) +* asm volatile("" :: "r"(i)); // keep i live here +* i = 0; // i becomes const 0 (DW_OP_constu 0, stack_value) +* asm volatile("" :: "r"(i)); // keep the const range materialized +* return 0; // i ends -> <undef> after its range +* } +*/ + + .file "seed_reg_const_undef.c" + .text + .globl main # -- Begin function main + .p2align 4 + .type main,@function +main: # @main +.Lfunc_begin0: + .file 0 "." "seed_reg_const_undef.c" md5 0x5e8dbf089d1bd72d395da802210b3138 + .loc 0 3 0 # seed_reg_const_undef.c:3:0 + .cfi_startproc +# %bb.0: # %entry + #DEBUG_VALUE: main:argc <- $edi + #DEBUG_VALUE: main:argv <- $rsi + pushq %rbp + .cfi_def_cfa_offset 16 + .cfi_offset %rbp, -16 + movq %rsp, %rbp + .cfi_def_cfa_register %rbp +.Ltmp0: + #DEBUG_VALUE: main:i <- $edi + .loc 0 5 3 prologue_end # seed_reg_const_undef.c:5:3 + #APP + #NO_APP +.Ltmp1: + #DEBUG_VALUE: main:i <- 0 + .loc 0 7 3 # seed_reg_const_undef.c:7:3 + xorl %eax, %eax + #APP + #NO_APP + .loc 0 8 3 # seed_reg_const_undef.c:8:3 + xorl %eax, %eax + .loc 0 8 3 epilogue_begin is_stmt 0 # seed_reg_const_undef.c:8:3 + popq %rbp + .cfi_def_cfa %rsp, 8 + retq +.Ltmp2: +.Lfunc_end0: + .size main, .Lfunc_end0-main + .cfi_endproc + # -- End function + .section .debug_loclists,"",@progbits + .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length +.Ldebug_list_header_start0: + .short 5 # Version + .byte 8 # Address size + .byte 0 # Segment selector size + .long 1 # Offset entry count +.Lloclists_table_base0: + .long .Ldebug_loc0-.Lloclists_table_base0 +.Ldebug_loc0: + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp0-.Lfunc_begin0 # starting offset + .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset + .byte 1 # Loc expr size + .byte 85 # super-register DW_OP_reg5 + .byte 4 # DW_LLE_offset_pair + .uleb128 .Ltmp1-.Lfunc_begin0 # starting offset + .uleb128 .Lfunc_end0-.Lfunc_begin0 # ending offset + .byte 3 # Loc expr size + .byte 17 # DW_OP_consts + .byte 0 # 0 + .byte 159 # DW_OP_stack_value + .byte 0 # DW_LLE_end_of_list +.Ldebug_list_header_end0: + .section .debug_abbrev,"",@progbits + .byte 1 # Abbreviation Code + .byte 17 # DW_TAG_compile_unit + .byte 1 # DW_CHILDREN_yes + .byte 37 # DW_AT_producer + .byte 37 # DW_FORM_strx1 + .byte 19 # DW_AT_language + .byte 5 # DW_FORM_data2 + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 114 # DW_AT_str_offsets_base + .byte 23 # DW_FORM_sec_offset + .byte 16 # DW_AT_stmt_list + .byte 23 # DW_FORM_sec_offset + .byte 27 # DW_AT_comp_dir + .byte 37 # DW_FORM_strx1 + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 115 # DW_AT_addr_base + .byte 23 # DW_FORM_sec_offset + .ascii "\214\001" # DW_AT_loclists_base + .byte 23 # DW_FORM_sec_offset + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 2 # Abbreviation Code + .byte 46 # DW_TAG_subprogram + .byte 1 # DW_CHILDREN_yes + .byte 17 # DW_AT_low_pc + .byte 27 # DW_FORM_addrx + .byte 18 # DW_AT_high_pc + .byte 6 # DW_FORM_data4 + .byte 64 # DW_AT_frame_base + .byte 24 # DW_FORM_exprloc + .byte 122 # DW_AT_call_all_calls + .byte 25 # DW_FORM_flag_present + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 39 # DW_AT_prototyped + .byte 25 # DW_FORM_flag_present + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 63 # DW_AT_external + .byte 25 # DW_FORM_flag_present + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 3 # Abbreviation Code + .byte 5 # DW_TAG_formal_parameter + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 24 # DW_FORM_exprloc + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 4 # Abbreviation Code + .byte 52 # DW_TAG_variable + .byte 0 # DW_CHILDREN_no + .byte 2 # DW_AT_location + .byte 34 # DW_FORM_loclistx + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 58 # DW_AT_decl_file + .byte 11 # DW_FORM_data1 + .byte 59 # DW_AT_decl_line + .byte 11 # DW_FORM_data1 + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 5 # Abbreviation Code + .byte 36 # DW_TAG_base_type + .byte 0 # DW_CHILDREN_no + .byte 3 # DW_AT_name + .byte 37 # DW_FORM_strx1 + .byte 62 # DW_AT_encoding + .byte 11 # DW_FORM_data1 + .byte 11 # DW_AT_byte_size + .byte 11 # DW_FORM_data1 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 6 # Abbreviation Code + .byte 15 # DW_TAG_pointer_type + .byte 0 # DW_CHILDREN_no + .byte 73 # DW_AT_type + .byte 19 # DW_FORM_ref4 + .byte 0 # EOM(1) + .byte 0 # EOM(2) + .byte 0 # EOM(3) + .section .debug_info,"",@progbits +.Lcu_begin0: + .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit +.Ldebug_info_start0: + .short 5 # DWARF version number + .byte 1 # DWARF Unit Type + .byte 8 # Address Size (in bytes) + .long .debug_abbrev # Offset Into Abbrev. Section + .byte 1 # Abbrev [1] 0xc:0x5b DW_TAG_compile_unit + .byte 0 # DW_AT_producer + .short 29 # DW_AT_language + .byte 1 # DW_AT_name + .long .Lstr_offsets_base0 # DW_AT_str_offsets_base + .long .Lline_table_start0 # DW_AT_stmt_list + .byte 2 # DW_AT_comp_dir + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .long .Laddr_table_base0 # DW_AT_addr_base + .long .Lloclists_table_base0 # DW_AT_loclists_base + .byte 2 # Abbrev [2] 0x27:0x2d DW_TAG_subprogram + .byte 0 # DW_AT_low_pc + .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc + .byte 1 # DW_AT_frame_base + .byte 86 + # DW_AT_call_all_calls + .byte 3 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + # DW_AT_prototyped + .long 84 # DW_AT_type + # DW_AT_external + .byte 3 # Abbrev [3] 0x36:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 85 + .byte 5 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + .long 84 # DW_AT_type + .byte 3 # Abbrev [3] 0x40:0xa DW_TAG_formal_parameter + .byte 1 # DW_AT_location + .byte 84 + .byte 6 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 3 # DW_AT_decl_line + .long 88 # DW_AT_type + .byte 4 # Abbrev [4] 0x4a:0x9 DW_TAG_variable + .byte 0 # DW_AT_location + .byte 8 # DW_AT_name + .byte 0 # DW_AT_decl_file + .byte 4 # DW_AT_decl_line + .long 84 # DW_AT_type + .byte 0 # End Of Children Mark + .byte 5 # Abbrev [5] 0x54:0x4 DW_TAG_base_type + .byte 4 # DW_AT_name + .byte 5 # DW_AT_encoding + .byte 4 # DW_AT_byte_size + .byte 6 # Abbrev [6] 0x58:0x5 DW_TAG_pointer_type + .long 93 # DW_AT_type + .byte 6 # Abbrev [6] 0x5d:0x5 DW_TAG_pointer_type + .long 98 # DW_AT_type + .byte 5 # Abbrev [5] 0x62:0x4 DW_TAG_base_type + .byte 7 # DW_AT_name + .byte 6 # DW_AT_encoding + .byte 1 # DW_AT_byte_size + .byte 0 # End Of Children Mark +.Ldebug_info_end0: + .section .debug_str_offsets,"",@progbits + .long 40 # Length of String Offsets Set + .short 5 + .short 0 +.Lstr_offsets_base0: + .section .debug_str,"MS",@progbits,1 +.Linfo_string0: + .asciz "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" # string offset=0 +.Linfo_string1: + .asciz "seed_reg_const_undef.c" # string offset=119 +.Linfo_string2: + .asciz "." # string offset=142 +.Linfo_string3: + .asciz "main" # string offset=144 +.Linfo_string4: + .asciz "int" # string offset=149 +.Linfo_string5: + .asciz "argc" # string offset=153 +.Linfo_string6: + .asciz "argv" # string offset=158 +.Linfo_string7: + .asciz "char" # string offset=163 +.Linfo_string8: + .asciz "i" # string offset=168 + .section .debug_str_offsets,"",@progbits + .long .Linfo_string0 + .long .Linfo_string1 + .long .Linfo_string2 + .long .Linfo_string3 + .long .Linfo_string4 + .long .Linfo_string5 + .long .Linfo_string6 + .long .Linfo_string7 + .long .Linfo_string8 + .section .debug_addr,"",@progbits + .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution +.Ldebug_addr_start0: + .short 5 # DWARF version number + .byte 8 # Address size + .byte 0 # Segment selector size +.Laddr_table_base0: + .quad .Lfunc_begin0 +.Ldebug_addr_end0: + .ident "clang version 22.0.0git (https://github.com/UltimateForce21/llvm-project.git 79c0a9e1e7da0f727c41d27c9c6ff8a28bb7d06f)" + .section ".note.GNU-stack","",@progbits + .addrsig + .section .debug_line,"",@progbits +.Lline_table_start0: diff --git a/lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py b/lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py index a1adc20e864b..629361c6ae5b 100644 --- a/lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py +++ b/lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py @@ -12,6 +12,8 @@ class TestqOffsets(GDBRemoteTestBase): def test(self): self.server.responder = TestqOffsets.Responder() + # This ensures that we do not pick up any binaries on the host. + self.runCmd("platform select remote-linux") target = self.createTarget("qOffsets.yaml") text = target.modules[0].FindSection(".text") self.assertEqual(text.GetLoadAddress(target), lldb.LLDB_INVALID_ADDRESS) diff --git a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py index 774c61ad24d4..15bef0153ed0 100644 --- a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py +++ b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py @@ -201,7 +201,7 @@ class CrashingInferiorStepTestCase(TestBase): self.expect("next", substrs=["Process", expected_state]) if expected_state == "exited": - self.expect("thread list", error=True, substrs=["Process must be launched"]) + self.expect("thread list", error=True, substrs=["process must be launched"]) else: self.check_stop_reason() diff --git a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py index 1464f2ef8664..1ad4c7902494 100644 --- a/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py +++ b/lldb/test/API/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py @@ -98,7 +98,7 @@ class CrashingRecursiveInferiorStepTestCase(TestBase): self.expect("next", substrs=["Process", expected_state]) if expected_state == "exited": - self.expect("thread list", error=True, substrs=["Process must be launched"]) + self.expect("thread list", error=True, substrs=["process must be launched"]) else: self.check_stop_reason() diff --git a/lldb/test/API/functionalities/multiword-commands/TestMultiWordCommands.py b/lldb/test/API/functionalities/multiword-commands/TestMultiWordCommands.py index c34fd3f3892a..0fa3254127e0 100644 --- a/lldb/test/API/functionalities/multiword-commands/TestMultiWordCommands.py +++ b/lldb/test/API/functionalities/multiword-commands/TestMultiWordCommands.py @@ -26,5 +26,5 @@ class MultiwordCommandsTestCase(TestBase): self.expect( 'platform ""', error=True, - substrs=["Need to specify a non-empty subcommand."], + substrs=["need to specify a non-empty subcommand"], ) diff --git a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py index a68175dc4e4d..e9403b56ae19 100644 --- a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py +++ b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py @@ -696,6 +696,43 @@ class LinuxCoreTestCase(TestBase): self.expect("register read --all") + @skipIfLLVMTargetMissing("ARM") + def test_arm_core_vfp(self): + # check reading VFP registers + target = self.dbg.CreateTarget(None) + self.assertTrue(target, VALID_TARGET) + process = target.LoadCore("linux-arm-vfp.core") + + values = { + "d0": "0.5", + "d1": "1.5", + "d14": "14.5", + "d15": "15.5", + "s4": "4.5", + "s5": "5.5", + "s6": "6.5", + "s7": "7.5", + "fpscr": "0x20000000", + # s0 and s1 overlap d0, s2 and s3 overlap d1 and so on. Therefore, + # the following values are not as neat as those in the explicitly + # set registers. + "s0": "0", + "s1": "1.75", + "s2": "0", + "s3": "1.9375", + "s28": "0", + "s29": "2.703125", + "s30": "0", + "s31": "2.734375", + } + for regname, value in values.items(): + self.expect( + "register read {}".format(regname), + substrs=["{} = {}".format(regname, value)], + ) + + self.expect("register read --all") + @skipIfLLVMTargetMissing("RISCV") def test_riscv64_regs_gpr_fpr(self): # check basic registers using 64 bit RISC-V core file diff --git a/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py b/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py index 020a226924ea..497b8e8a19a8 100644 --- a/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py +++ b/lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py @@ -37,7 +37,7 @@ class GCoreTestCase(TestBase): for thread in process: reason = thread.GetStopReason() self.assertStopReason(reason, lldb.eStopReasonSignal) - signal = thread.GetStopReasonDataAtIndex(1) + signal = thread.GetStopReasonDataAtIndex(0) # Check we got signal 19 (SIGSTOP) self.assertEqual(signal, 19) diff --git a/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.c b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.c new file mode 100644 index 000000000000..afc1dce04f9a --- /dev/null +++ b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.c @@ -0,0 +1,24 @@ +// linux-arm-vfp.core was generated with: +// > gcc-12 -march=armv7+fp -nostdlib -static -Wl,--build-id=none \ +// linux-arm-vfp.c -o linux-arm-vfp.out +// > ulimit -c 1000 +// > ulimit -s 8 +// > env -i ./linux-arm-vfp.out + +static void foo(char *boom) { + asm volatile(R"( + vmov.f64 d0, #0.5 + vmov.f64 d1, #1.5 + vmov.f64 d14, #14.5 + vmov.f64 d15, #15.5 + vmov.f32 s4, #4.5 + vmov.f32 s5, #5.5 + vmov.f32 s6, #6.5 + vmov.f32 s7, #7.5 + vcmp.f32 s7, s6 + )"); + + *boom = 47; +} + +void _start(void) { foo(0); } diff --git a/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.core b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.core Binary files differnew file mode 100644 index 000000000000..217ba18fdf6d --- /dev/null +++ b/lldb/test/API/functionalities/postmortem/elf-core/linux-arm-vfp.core diff --git a/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py b/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py index 4a848d1c2eb9..6d9aef286a79 100644 --- a/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py +++ b/lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py @@ -91,7 +91,7 @@ class LinuxCoreThreadsTestCase(TestBase): reason = thread.GetStopReason() if thread.GetThreadID() == tid: self.assertStopReason(reason, lldb.eStopReasonSignal) - signal = thread.GetStopReasonDataAtIndex(1) + signal = thread.GetStopReasonDataAtIndex(0) # Check we got signal 4 (SIGILL) self.assertEqual(signal, 4) else: diff --git a/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py b/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py index 74e7c895c0fa..19edaac964e6 100644 --- a/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py +++ b/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py @@ -20,14 +20,15 @@ def isUbuntu18_04(): with open(path) as f: contents = f.read() if "Ubuntu 18.04" in contents: - return True + return "Ubuntu 18.04 is not supported." - return False + return None class TestRerunExprDylib(TestBase): @skipTestIfFn(isUbuntu18_04, bugnumber="rdar://103831050") @skipIfWindows + @skipIfRemote def test(self): """ Tests whether re-launching a process without destroying diff --git a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py index 9519c576689d..5916e62c44f2 100644 --- a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py +++ b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py @@ -284,6 +284,6 @@ class ScriptedProcesTestCase(TestBase): break self.assertEqual(idx, int(reg.value, 16)) - self.assertTrue(frame.IsArtificial(), "Frame is not artificial") + self.assertTrue(frame.IsSynthetic(), "Frame is not synthetic") pc = frame.GetPCAddress().GetLoadAddress(target_0) self.assertEqual(pc, 0x0100001B00) diff --git a/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py b/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py index 2721d961bcb9..835267221ddb 100644 --- a/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py +++ b/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py @@ -5,6 +5,7 @@ from typing import Any, Dict import lldb from lldb.plugins.scripted_process import ScriptedProcess from lldb.plugins.scripted_process import ScriptedThread +from lldb.plugins.scripted_process import ScriptedFrame class DummyStopHook: @@ -22,7 +23,7 @@ class DummyScriptedProcess(ScriptedProcess): def __init__(self, exe_ctx: lldb.SBExecutionContext, args: lldb.SBStructuredData): super().__init__(exe_ctx, args) - self.threads[0] = DummyScriptedThread(self, None) + self.threads[0] = DummyScriptedThread(self, args) self.memory = {} addr = 0x500000000 debugger = self.target.GetDebugger() @@ -69,6 +70,9 @@ class DummyScriptedThread(ScriptedThread): def __init__(self, process, args): super().__init__(process, args) self.frames.append({"pc": 0x0100001B00}) + self.frames.append(DummyScriptedFrame(self, args, len(self.frames), "baz123")) + self.frames.append(DummyScriptedFrame(self, args, len(self.frames), "bar")) + self.frames.append(DummyScriptedFrame(self, args, len(self.frames), "foo")) def get_thread_id(self) -> int: return 0x19 @@ -109,6 +113,65 @@ class DummyScriptedThread(ScriptedThread): ) +class DummyScriptedFrame(ScriptedFrame): + def __init__(self, thread, args, id, name, sym_ctx=None): + super().__init__(thread, args) + self.id = id + self.name = name + self.sym_ctx = sym_ctx + + def get_id(self): + return self.id + + def get_function_name(self): + return self.name + + def get_register_context(self) -> str: + return struct.pack( + "21Q", + 0x10001, + 0x10002, + 0x10003, + 0x10004, + 0x10005, + 0x10006, + 0x10007, + 0x10008, + 0x10009, + 0x100010, + 0x100011, + 0x100012, + 0x100013, + 0x100014, + 0x100015, + 0x100016, + 0x100017, + 0x100018, + 0x100019, + 0x100020, + 0x100021, + ) + + def get_symbol_context(self): + def get_symbol_context_for_function(func_name): + module = self.target.FindModule(self.target.GetExecutable()) + if not module.IsValid(): + return None + + sym_ctx_list = module.FindFunctions(func_name) + if not sym_ctx_list.IsValid() or sym_ctx_list.GetSize() == 0: + return None + + return sym_ctx_list.GetContextAtIndex(0) + + return ( + self.sym_ctx if self.sym_ctx else get_symbol_context_for_function(self.name) + ) + + def get_scripted_frame_plugin(self): + return DummyScriptedFrame.__module__ + "." + DummyScriptedFrame.__name__ + + def __lldb_init_module(debugger, dict): # This is used when loading the script in an interactive debug session to # automatically, register the stop-hook and launch the scripted process. diff --git a/lldb/test/API/functionalities/statusline/TestStatusline.py b/lldb/test/API/functionalities/statusline/TestStatusline.py index 33cd79736dc3..ca376cc595f3 100644 --- a/lldb/test/API/functionalities/statusline/TestStatusline.py +++ b/lldb/test/API/functionalities/statusline/TestStatusline.py @@ -124,6 +124,7 @@ class TestStatusline(PExpectTest): @skipIfRemote @skipIfWindows @skipIfDarwin + @skipIfLinux # https://github.com/llvm/llvm-project/issues/154763 @add_test_categories(["lldb-server"]) def test_modulelist_deadlock(self): """Regression test for a deadlock that occurs when the status line is enabled before connecting diff --git a/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py b/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py index 965da02ed0f9..afdc92dd4000 100644 --- a/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py +++ b/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py @@ -1,10 +1,9 @@ """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" - -import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil +from lldbsuite.test_event.build_exception import BuildError class StepUntilTestCase(TestBase): @@ -112,10 +111,15 @@ class StepUntilTestCase(TestBase): @no_debug_info_test @skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"]) @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipIf(compiler=no_match(["clang"])) def test_bad_line_discontinuous(self): """Test that we get an error if attempting to step outside the current function -- and the function is discontinuous""" - self.build(dictionary=self._build_dict_for_discontinuity()) + try: + self.build(dictionary=self._build_dict_for_discontinuity()) + except BuildError as ex: + self.skipTest(f"failed to build with linker script.") + _, _, thread, _ = lldbutil.run_to_source_breakpoint( self, "At the start", lldb.SBFileSpec(self.main_source) ) diff --git a/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py b/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py index 59e028acf014..08d78fb996c7 100644 --- a/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py +++ b/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py @@ -1,7 +1,7 @@ -import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil +from lldbsuite.test_event.build_exception import BuildError class TestStepUntilAPI(TestBase): @@ -74,15 +74,20 @@ class TestStepUntilAPI(TestBase): @skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"]) @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipIf(compiler=no_match(["clang"])) def test_hitting_discontinuous(self): """Test SBThread.StepOverUntil - targeting a line and hitting it -- with discontinuous functions""" - self._do_until( - self._build_dict_for_discontinuity(), - None, - self.less_than_two, - self.less_than_two, - ) + try: + self._do_until( + self._build_dict_for_discontinuity(), + None, + self.less_than_two, + self.less_than_two, + ) + except BuildError as ex: + self.skipTest(f"failed to build with linker script.") + self._assertDiscontinuity() def test_missing(self): @@ -93,15 +98,20 @@ class TestStepUntilAPI(TestBase): @skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"]) @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipIf(compiler=no_match(["clang"])) def test_missing_discontinuous(self): """Test SBThread.StepOverUntil - targeting a line and missing it by stepping out to call site -- with discontinuous functions""" - self._do_until( - self._build_dict_for_discontinuity(), - ["foo", "bar", "baz"], - self.less_than_two, - self.back_out_in_main, - ) + try: + self._do_until( + self._build_dict_for_discontinuity(), + ["foo", "bar", "baz"], + self.less_than_two, + self.back_out_in_main, + ) + except BuildError as ex: + self.skipTest(f"failed to build with linker script.") + self._assertDiscontinuity() def test_bad_line(self): @@ -120,13 +130,19 @@ class TestStepUntilAPI(TestBase): @skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"]) @skipIf(archs=no_match(["x86_64", "aarch64"])) + @skipIf(compiler=no_match(["clang"])) def test_bad_line_discontinuous(self): """Test that we get an error if attempting to step outside the current function -- and the function is discontinuous""" - self.build(dictionary=self._build_dict_for_discontinuity()) - _, _, thread, _ = lldbutil.run_to_source_breakpoint( - self, "At the start", self.main_spec - ) + + try: + self.build(dictionary=self._build_dict_for_discontinuity()) + _, _, thread, _ = lldbutil.run_to_source_breakpoint( + self, "At the start", self.main_spec + ) + except BuildError as ex: + self.skipTest(f"failed to build with linker script.") + self.assertIn( "step until target not in current function", thread.StepOverUntil( diff --git a/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py b/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py index ca8b74e35dff..51a28c501307 100644 --- a/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py +++ b/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py @@ -63,11 +63,14 @@ class TsanBasicTestCase(TestBase): substrs=["1 match found"], ) - # We should be stopped in __tsan_on_report process = self.dbg.GetSelectedTarget().process thread = process.GetSelectedThread() frame = thread.GetSelectedFrame() - self.assertIn("__tsan_on_report", frame.GetFunctionName()) + if self.platformIsDarwin(): + # We should not be stopped in the sanitizer library. + self.assertIn("f2", frame.GetFunctionName()) + else: + self.assertIn("__tsan_on_report", frame.GetFunctionName()) # The stopped thread backtrace should contain either line1 or line2 # from main.c. diff --git a/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py b/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py index 868a2864d2b5..9e9ea2114196 100644 --- a/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py +++ b/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py @@ -52,8 +52,11 @@ class UbsanBasicTestCase(TestBase): substrs=["1 match found"], ) - # We should be stopped in __ubsan_on_report - self.assertIn("__ubsan_on_report", frame.GetFunctionName()) + if self.platformIsDarwin(): + # We should not be stopped in the sanitizer library. + self.assertIn("main", frame.GetFunctionName()) + else: + self.assertIn("__ubsan_on_report", frame.GetFunctionName()) # The stopped thread backtrace should contain either 'align line' found = False diff --git a/lldb/test/API/functionalities/unwind/cortex-m-exception/Makefile b/lldb/test/API/functionalities/unwind/cortex-m-exception/Makefile new file mode 100644 index 000000000000..22f1051530f8 --- /dev/null +++ b/lldb/test/API/functionalities/unwind/cortex-m-exception/Makefile @@ -0,0 +1 @@ +include Makefile.rules diff --git a/lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py b/lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py new file mode 100644 index 000000000000..30b2a525eaab --- /dev/null +++ b/lldb/test/API/functionalities/unwind/cortex-m-exception/TestCortexMExceptionUnwind.py @@ -0,0 +1,73 @@ +""" +Test that we can backtrace up an ARM Cortex-M Exception return stack +""" + +import lldb +import json +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestCortexMExceptionUnwind(TestBase): + NO_DEBUG_INFO_TESTCASE = True + + # on the lldb-remote-linux-ubuntu CI, the binary.json's triple of + # armv7m-apple is not being set in the Target triple, and we're + # picking the wrong ABI plugin, ABISysV_arm. + # ABISysV_arm::CreateDefaultUnwindPlan() doesn't have a way to detect + # arm/thumb for a stack frame, or even the Target's triple for a + # Cortex-M part that is always thumb. It hardcodes r11 as the frame + # pointer register, which is correct for arm code but not thumb. + # It is never correct # on a Cortex-M target. + # The Darwin ABIMacOSX_arm diverges from AAPCS and always uses r7 for + # the frame pointer -- the thumb convention -- whether executing arm or + # thumb. So its CreateDefaultUnwindPlan picks the correct register for + # the frame pointer, and we can walk the stack. + # ABISysV_arm::CreateDefaultUnwindPlan will only get one frame and + # not be able to continue. + # + # This may only be occuring on a 32-bit Ubuntu bot; need to test + # 64-bit Ubuntu and confirm. + @skipUnlessDarwin + def test_no_fpu(self): + """Test that we can backtrace correctly through an ARM Cortex-M Exception return stack""" + + target = self.dbg.CreateTarget("") + exe = "binary.json" + with open(exe) as f: + exe_json = json.load(f) + exe_uuid = exe_json["uuid"] + + target.AddModule(exe, "", exe_uuid) + self.assertTrue(target.IsValid()) + + core = self.getBuildArtifact("core") + self.yaml2macho_core("armv7m-nofpu-exception.yaml", core, exe_uuid) + + process = target.LoadCore(core) + self.assertTrue(process.IsValid()) + + if self.TraceOn(): + self.runCmd("target list") + self.runCmd("image list") + self.runCmd("target modules dump sections") + self.runCmd("target modules dump symtab") + self.runCmd("bt") + + thread = process.GetThreadAtIndex(0) + self.assertTrue(thread.IsValid()) + + # We have 4 named stack frames and two unnamed + # frames above that. The topmost two stack frames + # were not interesting for this test, so I didn't + # create symbols for them. + self.assertEqual(thread.GetNumFrames(), 6) + stackframe_names = [ + "exception_catcher", + "exception_catcher", + "exception_thrower", + "main", + ] + for i, name in enumerate(stackframe_names): + self.assertEqual(name, thread.GetFrameAtIndex(i).GetSymbol().GetName()) diff --git a/lldb/test/API/functionalities/unwind/cortex-m-exception/armv7m-nofpu-exception.yaml b/lldb/test/API/functionalities/unwind/cortex-m-exception/armv7m-nofpu-exception.yaml new file mode 100644 index 000000000000..9ce5ff49d9b6 --- /dev/null +++ b/lldb/test/API/functionalities/unwind/cortex-m-exception/armv7m-nofpu-exception.yaml @@ -0,0 +1,64 @@ +cpu: armv7m +threads: + - regsets: + - flavor: gpr + registers: [{name: sp, value: 0x2000fe70}, {name: r7, value: 0x2000fe80}, + {name: pc, value: 0x0020392c}, {name: lr, value: 0x0020392d}] +memory-regions: + # stack memory fetched via + # (lldb) p/x $sp + # (lldb) x/128wx $sp + # % pbpaste | sed -e 's,.*: ,,' -e 's/ /, /g' -e 's/$/,/' + - addr: 0x2000fe70 + UInt32: [ + 0x0000002a, 0x20010e58, 0x00203923, 0x00000001, + 0x2000fe88, 0x00203911, 0x2000ffdc, 0xfffffff9, + 0x00000102, 0x00000002, 0x000003f0, 0x0000002a, + 0x20012620, 0x00203215, 0x00203366, 0x81000200, + 0x00203215, 0x200128b0, 0x0024928d, 0x2000fecc, + 0x002491ed, 0x20010e58, 0x20010e4c, 0x2000ffa0, + 0x200107a0, 0x0000003c, 0x200116e8, 0x200108b0, + 0x0020b895, 0x00000000, 0x0000e200, 0x2001227d, + 0x200121fd, 0x0000e000, 0x00000000, 0x200129a0, + 0x002035bf, 0x00000029, 0x000003d8, 0x20011120, + 0x200116e0, 0x40003800, 0x20011120, 0x00000000, + 0x00205169, 0x00203713, 0x00000000, 0x0022dcb9, + 0x40003800, 0x20011240, 0x00000000, 0xf7d71ecf, + 0xfc7676d6, 0x00000000, 0x968782d3, 0xe75afbbb, + 0x600d77c8, 0xc1c05886, 0x17f3e76d, 0xefc3054d, + 0x11940aaa, 0x00000000, 0x93bffabb, 0x6db85af0, + 0x00000000, 0x2001d76f, 0xcb35f653, 0x00000000, + 0x00000000, 0x079d5058, 0x00000000, 0x00000000, + 0xc5622949, 0x68682572, 0x00000075, 0x0000e500, + 0x20012c30, 0x00000000, 0xcdfcd8c2, 0x76efc90f, + 0x0024495f, 0x20012bf0, 0x0000e400, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0029089c, 0x0029089c, 0x00000000, 0x2000ffe4, + 0x00202a87, 0x2000ffec, 0x00200257, 0x2000fff4, + 0x00200211, 0x00000000, 0x00000000, 0x7badb3f6, + 0x20010794, 0x20010fac, 0x200109b0, 0x002887a4, + 0x00285688, 0x002854c8, 0x00288f74, 0x0028a618, + 0x0028a6f8, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x002037dd, 0x00000000, + 0x00000002, 0x00000100, 0x00000000, 0x20010064, + 0x00000000, 0x00000000, 0x00000000, 0x200109c0, + 0x00000000, 0x00000000, 0x00000000, 0x00000000 + ] + # exception_catcher() function bytes + # (lldb) dis + # binary`exception_catcher: + # 0x203910 <+0>: push {r3, r4, r5, r6, r7, lr} + # 0x203912 <+2>: add r7, sp, #0x10 + # ... + # (lldb) x/44bx 0x203910 + # % pbpaste | sed -e 's,.*: ,,' -e 's/ /, /g' -e 's/$/,/' + - addr: 0x203910 + UInt8: [ + 0xf8, 0xb5, 0x04, 0xaf, 0x06, 0x4c, 0x07, 0x49, + 0x74, 0xf0, 0x2e, 0xf8, 0x01, 0xac, 0x74, 0xf0, + 0x61, 0xf8, 0x05, 0x48, 0x76, 0xf0, 0xdf, 0xfe, + 0x74, 0xf0, 0x0b, 0xf9, 0xfe, 0xe7, 0x00, 0xbf, + 0x4c, 0x0e, 0x01, 0x20, 0x0d, 0x35, 0x20, 0x00, + 0x98, 0xae, 0x28, 0x00 + ] + diff --git a/lldb/test/API/functionalities/unwind/cortex-m-exception/binary.json b/lldb/test/API/functionalities/unwind/cortex-m-exception/binary.json new file mode 100644 index 000000000000..8fcd5307ff82 --- /dev/null +++ b/lldb/test/API/functionalities/unwind/cortex-m-exception/binary.json @@ -0,0 +1,41 @@ +{ + "triple": "armv7m-apple", + "uuid": "2D157DBA-53C9-3AC7-B5A1-9D336EC831CB", + "type": "executable", + "sections": [ + { + "user_id": 100, + "name": "TEXT", + "type": "code", + "address": 2097664, + "size": 598872, + "file_offset": 0, + "file_size": 598872, + "alignment": 2, + "flags": 514, + "read": true, + "write": false, + "execute": true + } + ], + "symbols": [ + { + "name": "main", + "type": "code", + "size": 10, + "address": 2108030 + }, + { + "name": "exception_catcher", + "type": "code", + "size": 44, + "address": 2111760 + }, + { + "name": "exception_thrower", + "type": "code", + "size": 2652, + "address": 2108040 + } + ] +} |
