[llvm-dev] GSoC project on finding and fixing bugs with debug info
Himeshi De Silva via llvm-dev
llvm-dev at lists.llvm.org
Tue Apr 11 07:21:32 PDT 2017
Hi,
I would like to learn more about the GSoC project to find and fix bugs that
changes the generated code when it is compiled with the debug info option (
http://llvm.org/OpenProjects.html#gsoc17). I have built llvm with clang and
I compiled the hello.c program found in http://llvm.org/docs/Gettin
gStarted.html with and without the -g flag. I disassembled both using
llvm-dis and took the diff of them. The diff file does show differences
(see attached) and as I understand this shouldn't be the case.
I would like to know the following about this project.
- What is the scope of this project? Are the bugs that cause these
differences and how many of them there are, known? If not what should be
the deliverable of the project?
- Which are the test programs that can be used to discover these bugs?
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170411/131de10b/attachment.html>
-------------- next part --------------
9c9
< define i32 @main() local_unnamed_addr #0 {
---
> define i32 @main() local_unnamed_addr #0 !dbg !6 {
11,12c11,12
< %puts = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
< ret i32 0
---
> %puts = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0)), !dbg !10
> ret i32 0, !dbg !11
21c21,23
< !llvm.ident = !{!0}
---
> !llvm.dbg.cu = !{!0}
> !llvm.module.flags = !{!3, !4}
> !llvm.ident = !{!5}
23c25,36
< !0 = !{!"clang version 5.0.0 (trunk 299830)"}
---
> !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 5.0.0 (trunk 299830)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
> !1 = !DIFile(filename: "helloworld.c", directory: "/home/himeshi/Projects/gsoc/programs")
> !2 = !{}
> !3 = !{i32 2, !"Dwarf Version", i32 4}
> !4 = !{i32 2, !"Debug Info Version", i32 3}
> !5 = !{!"clang version 5.0.0 (trunk 299830)"}
> !6 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !7, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2)
> !7 = !DISubroutineType(types: !8)
> !8 = !{!9}
> !9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
> !10 = !DILocation(line: 4, column: 3, scope: !6)
> !11 = !DILocation(line: 5, column: 3, scope: !6)
More information about the llvm-dev
mailing list