diff options
| author | Paul Robinson <paul_robinson@playstation.sony.com> | 2015-12-19 19:41:48 +0000 |
|---|---|---|
| committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2015-12-19 19:41:48 +0000 |
| commit | 0334a047df7a1b9592221ac345e6c0663e56891d (patch) | |
| tree | 4d4b9834badde499996c7dc01e9350c56e6d0b1f /clang/test | |
| parent | f48a1f54dd7ca643d92044ad13f33568e725ec4a (diff) | |
| download | bcm5719-llvm-0334a047df7a1b9592221ac345e6c0663e56891d.tar.gz bcm5719-llvm-0334a047df7a1b9592221ac345e6c0663e56891d.zip | |
Driver part of debugger tuning.
Adds driver options named -glldb and -gsce to mean -g plus tuning for
lldb and SCE debuggers respectively; the existing -ggdb option does
the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into
-ggdb -g<N>. (There will not be -glldb<N> or -gsce<N> options.) The
tuning gets a target-specific default in the driver, and is passed
into cc1 with the new -debugger-tuning option.
As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part
on Linux.
Differential Revision: http://reviews.llvm.org/D15651
llvm-svn: 256104
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/debug-options.c | 31 | ||||
| -rw-r--r-- | clang/test/Driver/split-debug.c | 13 |
2 files changed, 39 insertions, 5 deletions
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c index 8f865f2f5b8..e160b7fd326 100644 --- a/clang/test/Driver/debug-options.c +++ b/clang/test/Driver/debug-options.c @@ -2,31 +2,38 @@ // rdar://10383444 // RUN: %clang -### -c -g %s -target x86_64-linux-gnu 2>&1 \ -// RUN: | FileCheck -check-prefix=G %s +// RUN: | FileCheck -check-prefix=G -check-prefix=G_GDB %s // RUN: %clang -### -c -g2 %s -target x86_64-linux-gnu 2>&1 \ // RUN: | FileCheck -check-prefix=G %s // RUN: %clang -### -c -g3 %s -target x86_64-linux-gnu 2>&1 \ // RUN: | FileCheck -check-prefix=G %s // RUN: %clang -### -c -ggdb %s -target x86_64-linux-gnu 2>&1 \ -// RUN: | FileCheck -check-prefix=G %s +// RUN: | FileCheck -check-prefix=G -check-prefix=G_GDB %s // RUN: %clang -### -c -ggdb1 %s -target x86_64-linux-gnu 2>&1 \ -// RUN: | FileCheck -check-prefix=GLTO_ONLY %s +// RUN: | FileCheck -check-prefix=GLTO_ONLY -check-prefix=G_GDB %s // RUN: %clang -### -c -ggdb3 %s -target x86_64-linux-gnu 2>&1 \ // RUN: | FileCheck -check-prefix=G %s +// RUN: %clang -### -c -glldb %s -target x86_64-linux-gnu 2>&1 \ +// RUN: | FileCheck -check-prefix=G -check-prefix=G_LLDB %s +// RUN: %clang -### -c -gsce %s -target x86_64-linux-gnu 2>&1 \ +// RUN: | FileCheck -check-prefix=G -check-prefix=G_SCE %s // RUN: %clang -### -c -g %s -target x86_64-apple-darwin 2>&1 \ -// RUN: | FileCheck -check-prefix=G_DARWIN %s +// RUN: | FileCheck -check-prefix=G_DARWIN -check-prefix=G_LLDB %s // RUN: %clang -### -c -g2 %s -target x86_64-apple-darwin 2>&1 \ // RUN: | FileCheck -check-prefix=G_DARWIN %s // RUN: %clang -### -c -g3 %s -target x86_64-apple-darwin 2>&1 \ // RUN: | FileCheck -check-prefix=G_DARWIN %s // RUN: %clang -### -c -ggdb %s -target x86_64-apple-darwin 2>&1 \ -// RUN: | FileCheck -check-prefix=G_DARWIN %s +// RUN: | FileCheck -check-prefix=G_DARWIN -check-prefix=G_GDB %s // RUN: %clang -### -c -ggdb1 %s -target x86_64-apple-darwin 2>&1 \ // RUN: | FileCheck -check-prefix=GLTO_ONLY_DWARF2 %s // RUN: %clang -### -c -ggdb3 %s -target x86_64-apple-darwin 2>&1 \ // RUN: | FileCheck -check-prefix=G_DARWIN %s +// RUN: %clang -### -c -g %s -target x86_64-pc-freebsd10.0 2>&1 \ +// RUN: | FileCheck -check-prefix=G_LLDB %s + // On the PS4, -g defaults to -gno-column-info, and we always generate the // arange section. // RUN: %clang -### -c %s -target x86_64-scei-ps4 2>&1 \ @@ -34,6 +41,8 @@ // RUN: %clang -### -c %s -g -target x86_64-scei-ps4 2>&1 \ // RUN: | FileCheck -check-prefix=G_PS4 %s // RUN: %clang -### -c %s -g -target x86_64-scei-ps4 2>&1 \ +// RUN: | FileCheck -check-prefix=G_SCE %s +// RUN: %clang -### -c %s -g -target x86_64-scei-ps4 2>&1 \ // RUN: | FileCheck -check-prefix=NOCI %s // RUN: %clang -### -c %s -g -gcolumn-info -target x86_64-scei-ps4 2>&1 \ // RUN: | FileCheck -check-prefix=CI %s @@ -43,6 +52,14 @@ // RUN: %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_NO %s // RUN: %clang -### -c -g -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s // RUN: %clang -### -c -ggdb0 %s 2>&1 | FileCheck -check-prefix=G_NO %s +// RUN: %clang -### -c -glldb -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s +// RUN: %clang -### -c -glldb -g1 %s 2>&1 \ +// RUN: | FileCheck -check-prefix=GLTO_ONLY -check-prefix=G_LLDB %s +// +// PS4 defaults to sce; -ggdb0 changes tuning but turns off debug info, +// then -g turns it back on without affecting tuning. +// RUN: %clang -### -c -ggdb0 -g -target x86_64-scei-ps4 %s 2>&1 \ +// RUN: | FileCheck -check-prefix=G -check-prefix=G_GDB %s // // RUN: %clang -### -c -g1 %s 2>&1 \ // RUN: | FileCheck -check-prefix=GLTO_ONLY %s @@ -123,6 +140,10 @@ // G_ONLY: "-cc1" // G_ONLY: "-debug-info-kind=limited" // +// G_GDB: "-debugger-tuning=gdb" +// G_LLDB: "-debugger-tuning=lldb" +// G_SCE: "-debugger-tuning=sce" +// // These tests assert that "-gline-tables-only" "-g" uses the latter, // but otherwise not caring about the DebugInfoKind. // G_ONLY_DWARF2: "-cc1" diff --git a/clang/test/Driver/split-debug.c b/clang/test/Driver/split-debug.c index 73206a5e5f3..ed668520939 100644 --- a/clang/test/Driver/split-debug.c +++ b/clang/test/Driver/split-debug.c @@ -45,3 +45,16 @@ // // CHECK-SPLIT-OVER-GMLT: "-split-dwarf=Enable" "-debug-info-kind=limited" // CHECK-SPLIT-OVER-GMLT: "-split-dwarf-file" + +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -S -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s +// +// CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind +// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf=Enable" +// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file" + +// RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf -S -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s +// +// CHECK-SPLIT-OVER-G0: "-split-dwarf=Enable" "-debug-info-kind=limited" +// CHECK-SPLIT-OVER-G0: "-split-dwarf-file" |

