From 27613b1ab9b4b202c5810560f5e2f2f6eaccf2dc Mon Sep 17 00:00:00 2001 From: David Lattimore Date: Mon, 17 Aug 2026 18:11:24 +1000 Subject: [PATCH] chore: Add more stable test for line number debug --- .../dwarf-line-add-sub/dwarf-line-add-sub.s | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 wild/tests/sources/elf/dwarf-line-add-sub/dwarf-line-add-sub.s diff --git a/wild/tests/sources/elf/dwarf-line-add-sub/dwarf-line-add-sub.s b/wild/tests/sources/elf/dwarf-line-add-sub/dwarf-line-add-sub.s new file mode 100644 index 000000000..423227a52 --- /dev/null +++ b/wild/tests/sources/elf/dwarf-line-add-sub/dwarf-line-add-sub.s @@ -0,0 +1,27 @@ +/* + +This test is similar to source-info-from-debug, but due to being asm, can more reliably pick up some +problems that test fails to detect. + +//#CompArgs:-g +//#ExpectError:the-answer:42 +*/ + +.file 1 "the-answer" + +.section .text +.globl _start +.type _start, @function +_start: + .loc 1 2 + nop + .loc 1 12 + nop + .loc 1 22 + nop + .loc 1 32 + nop + .loc 1 42 + nop + .8byte undefined +.size _start, .-_start