mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 08:01:05 +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
-5
@@ -31,13 +31,13 @@ fn Call(a: A*) -> A* {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define ptr @Get(ptr %self) !dbg !4 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret ptr %self
|
||||
// CHECK:STDOUT: ret ptr %self, !dbg !7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define ptr @Call(ptr %a) !dbg !7 {
|
||||
// CHECK:STDOUT: define ptr @Call(ptr %a) !dbg !8 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %Get.call = call ptr @Get(ptr %a)
|
||||
// CHECK:STDOUT: ret ptr %Get.call
|
||||
// CHECK:STDOUT: %Get.call = call ptr @Get(ptr %a), !dbg !9
|
||||
// CHECK:STDOUT: ret ptr %Get.call, !dbg !10
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
|
||||
@@ -50,4 +50,7 @@ fn Call(a: A*) -> A* {
|
||||
// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "Get", scope: null, file: !3, line: 19, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
|
||||
// CHECK:STDOUT: !6 = !{}
|
||||
// CHECK:STDOUT: !7 = distinct !DISubprogram(name: "Call", scope: null, file: !3, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !7 = !DILocation(line: 20, column: 7, scope: !4)
|
||||
// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "Call", scope: null, file: !3, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !9 = !DILocation(line: 26, column: 10, scope: !8)
|
||||
// CHECK:STDOUT: !10 = !DILocation(line: 26, column: 3, scope: !8)
|
||||
|
||||
Reference in New Issue
Block a user