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:
+8
-4
@@ -27,10 +27,10 @@ fn Run() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @main() !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8
|
||||
// CHECK:STDOUT: %d.var = alloca { i32, ptr }, align 8
|
||||
// CHECK:STDOUT: call void @F(ptr %d.var, ptr %c.var)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !7
|
||||
// CHECK:STDOUT: %d.var = alloca { i32, ptr }, align 8, !dbg !8
|
||||
// CHECK:STDOUT: call void @F(ptr %d.var, ptr %c.var), !dbg !9
|
||||
// CHECK:STDOUT: ret void, !dbg !10
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
|
||||
@@ -43,3 +43,7 @@ fn Run() {
|
||||
// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "main", scope: null, file: !3, line: 18, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{}
|
||||
// CHECK:STDOUT: !7 = !DILocation(line: 19, column: 7, scope: !4)
|
||||
// CHECK:STDOUT: !8 = !DILocation(line: 20, column: 7, scope: !4)
|
||||
// CHECK:STDOUT: !9 = !DILocation(line: 20, column: 14, scope: !4)
|
||||
// CHECK:STDOUT: !10 = !DILocation(line: 18, column: 1, scope: !4)
|
||||
|
||||
Reference in New Issue
Block a user