<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57910>57910</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            LLVM-produced debug info crashes LLDB
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          topolarity
      </td>
    </tr>
</table>

<pre>
    ```llvm
; reduced.ll
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define void @_start() {
Entry:
  unreachable
}

define internal fastcc void @printTargetArch(ptr %0) !dbg !2251 {
Entry:
  %1 = load i6, ptr null, align 1, !dbg !2258
  store i6 %1, ptr %0, align 1
  ret void
}

!llvm.module.flags = !{!0, !1}
!llvm.dbg.cu = !{!2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 2, !"Dwarf Version", i32 4}
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "zig 0.10.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !1306)
!3 = !DIFile(filename: "testme", directory: ".")
!4 = !{!96}
!21 = !DIBasicType(name: "u2", size: 2, encoding: DW_ATE_unsigned)
!27 = !DIFile(filename: "target.zig", directory: "/home/topolarity/repos/zig/build/stage3/lib/zig/std")

!96 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "@typeInfo(std.target.Target.Os.VersionRange).Union.tag_type.?", scope: !27, file: !27, line: 225, baseType: !21, size: 8, align: 8, elements: !97)
!97 = !{!98, !99, !100, !101}
!98 = !DIEnumerator(name: "none", value: 0)
!99 = !DIEnumerator(name: "semver", value: 1)
!100 = !DIEnumerator(name: "linux", value: 2)
!101 = !DIEnumerator(name: "windows", value: 3)

!1306 = !{}

!1320 = !DICompositeType(tag: DW_TAG_structure_type, name: "std.target.Target.Os.VersionRange", scope: !27, file: !27, line: 225, size: 320, align: 32, elements: !1321)
!1321 = !{!1322}
!1322 = !DIDerivedType(tag: DW_TAG_member, name: "tag", scope: !1320, file: !27, line: 225, baseType: !96, size: 2, align: 8, offset: 288)

!2251 = distinct !DISubprogram(name: "printTargetArch", scope: !2252, file: !2252, line: 4, type: !2253, scopeLine: 4, flags: DIFlagStaticMember, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !2256)
!2252 = !DIFile(filename: "testme.zig", directory: "/home/topolarity/repos/zig")
!2253 = !DISubroutineType(types: !2254)
!2254 = !{null, !2255}
!2255 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "*std.target.Target", baseType: !1320, size: 64, align: 64)
!2256 = !{!2257}
!2257 = !DILocalVariable(name: "t", arg: 1, scope: !2251, file: !2252, line: 4, type: !1320)
!2258 = !DILocation(line: 5, column: 39, scope: !2259)
!2259 = distinct !DILexicalBlock(scope: !2251, file: !2252, line: 4, column: 40)
```

To reproduce:
```console
$ llc-15 ./reduced.ll -o ./test.o -filetype=obj
$ ld.lld-15 -o test ./test.o
$ lldb test -o "br set -f testme.zig -l 5" -o "r"
```

Result:
```console
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'
(lldb) target create "testme"
Current executable set to '/home/topolarity/repos/zig/testme' (x86_64).
(lldb) br set -f testme.zig -l 5
Breakpoint 1: where = testme`printTargetArch at testme.zig:5:39, address = 0x0000000000201170
(lldb) r
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: lldb testme -o "br set -f testme.zig -l 5" -o r -o exit
1.      HandleCommand(command = "r")
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x31)[0x7fa28f0a5a71]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x7fa28f0a37be]
/lib/x86_64-linux-gnu/libLLVM-14.so.1(+0xea5fa6)[0x7fa28f0a5fa6]
/lib/x86_64-linux-gnu/libc.so.6(+0x3daf0)[0x7fa28da3daf0]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang10ASTContext19getTypeAlignInCharsENS_8QualTypeE+0xb)[0x7fa29571755b]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(+0xe62808)[0x7fa295a62808]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(+0xe5eea6)[0x7fa295a5eea6]
/lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang10ASTContext18getASTRecordLayoutEPKNS_10RecordDeclE+0x346d)[0x7fa295a5a34d]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x959210)[0x7fa298f59210]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x51ba2b)[0x7fa298b1ba2b]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x4598d1)[0x7fa298a598d1]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x458e4b)[0x7fa298a58e4b]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x47a7cf)[0x7fa298a7a7cf]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x425567)[0x7fa298a25567]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x423fb3)[0x7fa298a23fb3]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x423fb3)[0x7fa298a23fb3]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x423d30)[0x7fa298a23d30]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x5a6e75)[0x7fa298ba6e75]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x5a7316)[0x7fa298ba7316]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x5ac72a)[0x7fa298bac72a]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x5ebea3)[0x7fa298bebea3]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x57d4f3)[0x7fa298b7d4f3]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x57c611)[0x7fa298b7c611]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x57b0c2)[0x7fa298b7b0c2]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x57f592)[0x7fa298b7f592]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x5d272d)[0x7fa298bd272d]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x9e5784)[0x7fa298fe5784]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x4edb67)[0x7fa298aedb67]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x4e2524)[0x7fa298ae2524]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x4e651a)[0x7fa298ae651a]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x42c4ef)[0x7fa298a2c4ef]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x40ccf4)[0x7fa298a0ccf4]
/lib/x86_64-linux-gnu/liblldb-14.so.1(+0x4e7fad)[0x7fa298ae7fad]
/lib/x86_64-linux-gnu/liblldb-14.so.1(_ZN4lldb10SBDebugger21RunCommandInterpreterERKNS_30SBCommandInterpreterRunOptionsE+0x85)[0x7fa298814165]
lldb[0x408107]
lldb[0x4094b5]
/lib/x86_64-linux-gnu/libc.so.6(+0x2920a)[0x7fa28da2920a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x7c)[0x7fa28da292bc]
lldb[0x4045ca]
```

Also reproduces with "llc-14 -opaque-pointers"

Downstream issue: https://github.com/ziglang/zig/issues/12929
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNWUtz2zgS_jXyBSUVAb4PPtiWPOOK42Rtb7Z2LioQhGROS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