mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +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:
@@ -19,8 +19,8 @@ fn G(n: i32) { F(n); }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @G(i32 %n) !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @F(i32 %n)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: call void @F(i32 %n), !dbg !7
|
||||
// CHECK:STDOUT: ret void, !dbg !8
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
|
||||
@@ -33,3 +33,5 @@ fn G(n: i32) { F(n); }
|
||||
// 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: 13, column: 16, scope: !4)
|
||||
// CHECK:STDOUT: !8 = !DILocation(line: 13, column: 1, scope: !4)
|
||||
|
||||
Reference in New Issue
Block a user