mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add line-level debug info (#4247)
Seems to work with lldb ( https://pastebin.com/igKkNECm ), though gdb has /some/ trouble with the paths (they aren't complete - just using the filename directly, not providing the working directory - might be some quick hacks that can help there).
This commit is contained in:
+11
-6
@@ -21,12 +21,12 @@ fn G() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @G() !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %v.var = alloca [2 x { i32, i32, i32 }], align 8
|
||||
// CHECK:STDOUT: %.loc14_42.2.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, i32 0
|
||||
// CHECK:STDOUT: call void @F(ptr %.loc14_42.2.array.index)
|
||||
// CHECK:STDOUT: %.loc14_42.5.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, i32 1
|
||||
// CHECK:STDOUT: call void @F(ptr %.loc14_42.5.array.index)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: %v.var = alloca [2 x { i32, i32, i32 }], align 8, !dbg !7
|
||||
// CHECK:STDOUT: %.loc14_42.2.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, i32 0, !dbg !8
|
||||
// CHECK:STDOUT: call void @F(ptr %.loc14_42.2.array.index), !dbg !9
|
||||
// CHECK:STDOUT: %.loc14_42.5.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, i32 1, !dbg !8
|
||||
// CHECK:STDOUT: call void @F(ptr %.loc14_42.5.array.index), !dbg !10
|
||||
// CHECK:STDOUT: ret void, !dbg !11
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
|
||||
@@ -39,3 +39,8 @@ fn G() {
|
||||
// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "G", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{}
|
||||
// CHECK:STDOUT: !7 = !DILocation(line: 14, column: 7, scope: !4)
|
||||
// CHECK:STDOUT: !8 = !DILocation(line: 14, column: 33, scope: !4)
|
||||
// CHECK:STDOUT: !9 = !DILocation(line: 14, column: 34, scope: !4)
|
||||
// CHECK:STDOUT: !10 = !DILocation(line: 14, column: 39, scope: !4)
|
||||
// CHECK:STDOUT: !11 = !DILocation(line: 13, column: 1, scope: !4)
|
||||
|
||||
Reference in New Issue
Block a user