1; Verify target-based defaults for "debugger tuning," and the ability to
2; override defaults.
3; We use existence of the debug_pubnames section to distinguish the GDB case,
4; and the apple_names section to distinguish the LLDB case. SCE has neither.
5
6; Verify defaults for various targets.
7; RUN: llc -mtriple=x86_64-scei-ps4 -filetype=obj < %s | llvm-readobj -sections - | FileCheck --check-prefix=SCE %s
8; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj < %s | llvm-readobj -sections - | FileCheck --check-prefix=LLDB %s
9; RUN: llc -mtriple=x86_64-pc-freebsd -filetype=obj < %s | llvm-readobj -sections - | FileCheck --check-prefix=GDB %s
10; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj < %s | llvm-readobj -sections - | FileCheck --check-prefix=GDB %s
11
12; We can override defaults.
13; RUN: llc -mtriple=x86_64-scei-ps4 -filetype=obj -debugger-tune=gdb < %s | llvm-readobj -sections - | FileCheck --check-prefix=GDB %s
14; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -debugger-tune=lldb < %s | llvm-readobj -sections - | FileCheck --check-prefix=LLDB %s
15; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj -debugger-tune=sce < %s | llvm-readobj -sections - | FileCheck --check-prefix=SCE %s
16
17
18; GDB-NOT: apple_names
19; GDB: debug_pubnames
20; GDB-NOT: apple_names
21
22; LLDB-NOT: debug_pubnames
23; LLDB: apple_names
24; LLDB-NOT: debug_pubnames
25
26; SCE-NOT: debug_pubnames
27; SCE-NOT: apple_names
28
29
30@globalvar = global i32 0, align 4
31
32!llvm.dbg.cu = !{!0}
33!llvm.module.flags = !{!6, !7}
34!llvm.ident = !{!8}
35
36!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 238808)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
37!1 = !DIFile(filename: "debugger-tune.cpp", directory: "/home/probinson/projects/scratch")
38!2 = !{}
39!3 = !{!4}
40!4 = !DIGlobalVariable(name: "globalvar", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, variable: i32* @globalvar)
41!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
42!6 = !{i32 2, !"Dwarf Version", i32 4}
43!7 = !{i32 2, !"Debug Info Version", i32 3}
44!8 = !{!"clang version 3.7.0 (trunk 238808)"}
45