diff options
Diffstat (limited to 'lit/tools/lldb-mi')
29 files changed, 0 insertions, 417 deletions
diff --git a/lit/tools/lldb-mi/breakpoint/break-insert-enable-pending.test b/lit/tools/lldb-mi/breakpoint/break-insert-enable-pending.test deleted file mode 100644 index 48f86b4d678c..000000000000 --- a/lit/tools/lldb-mi/breakpoint/break-insert-enable-pending.test +++ /dev/null @@ -1,47 +0,0 @@ -# XFAIL: system-windows -# -> llvm.org/pr24452 -# -# RUN: %clang -o %t %p/inputs/break-insert-pending.c -g -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test for enabling pending breakpoints globally - --break-insert printf -# CHECK: ^error,msg="Command 'break-insert'. Breakpoint location 'printf' not found - --gdb-set breakpoint pending on -# CHECK: ^done --gdb-show breakpoint pending -# CHECK: ^done,value="on" --break-insert printf -# CHECK: ^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"} - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit",disp="del",bkptno="2",frame={level="0",addr="{{0x[0-9a-f]*[^f][0-9a-f]*}}" --break-disable 2 -# CHECK: ^done --exec-continue -# CHECK: ^running -# CHECK: *stopped,reason="exited-normally" - -# Test that it can be turned back off --gdb-show breakpoint pending -# CHECK: ^done,value="on" --gdb-set breakpoint pending off -# CHECK: ^done --gdb-show breakpoint pending -# CHECK: ^done,value="off" --break-insert printf-non-existent -# CHECK: ^error,msg="Command 'break-insert'. Breakpoint location 'printf-non-existent' not found" -# Check that enable/disable with 1 and 0 works --gdb-set breakpoint pending 1 -# CHECK: ^done --gdb-show breakpoint pending -# CHECK: ^done,value="on" --gdb-set breakpoint pending 0 -# CHECK: ^done --gdb-show breakpoint pending -# CHECK: ^done,value="off" --gdb-set breakpoint pending garbage -# CHECK: ^done diff --git a/lit/tools/lldb-mi/breakpoint/break-insert.test b/lit/tools/lldb-mi/breakpoint/break-insert.test deleted file mode 100644 index ef50bf530077..000000000000 --- a/lit/tools/lldb-mi/breakpoint/break-insert.test +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: %build %p/inputs/break-insert.c --nodefaultlib -o a.exe -# RUN: %lldbmi < %s | FileCheck %s - -# Test that a breakpoint can be inserted before creating a target. - --break-insert breakpoint -# CHECK: ^done,bkpt={number="1" - --file-exec-and-symbols a.exe -# CHECK: ^done - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - diff --git a/lit/tools/lldb-mi/breakpoint/inputs/break-insert-pending.c b/lit/tools/lldb-mi/breakpoint/inputs/break-insert-pending.c deleted file mode 100644 index 99722abfbd4b..000000000000 --- a/lit/tools/lldb-mi/breakpoint/inputs/break-insert-pending.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <stdio.h> - -int main(int argc, char const *argv[]) { - printf("Print a formatted string so that GCC does not optimize this printf call: %s\n", argv[0]); - return 0; -} diff --git a/lit/tools/lldb-mi/breakpoint/inputs/break-insert.c b/lit/tools/lldb-mi/breakpoint/inputs/break-insert.c deleted file mode 100644 index 67d2e56ee597..000000000000 --- a/lit/tools/lldb-mi/breakpoint/inputs/break-insert.c +++ /dev/null @@ -1,7 +0,0 @@ -int breakpoint() { // Breakpoint will be set here. - return 0; -} - -int main() { - return breakpoint(); -} diff --git a/lit/tools/lldb-mi/breakpoint/lit.local.cfg b/lit/tools/lldb-mi/breakpoint/lit.local.cfg deleted file mode 100644 index df9b335dd131..000000000000 --- a/lit/tools/lldb-mi/breakpoint/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.test'] diff --git a/lit/tools/lldb-mi/data/data-info-line.test b/lit/tools/lldb-mi/data/data-info-line.test deleted file mode 100644 index 287e833ab9ef..000000000000 --- a/lit/tools/lldb-mi/data/data-info-line.test +++ /dev/null @@ -1,33 +0,0 @@ -# RUN: %build %p/inputs/data-info-line.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -data-info-line command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --data-info-line *0x0 -# Test that -data-info-line fails when invalid address is specified. -# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format." - --data-info-line unknown_file:1 -# Test that -data-info-line fails when file is unknown. -# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format." - --data-info-line data-info-line.c:bad_line -# Test that -data-info-line fails when line has invalid format. -# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format." - --data-info-line data-info-line.c:0 -# Test that -data-info-line fails when invalid line is specified. -# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format." - --data-info-line data-info-line.c:2 -# CHECK: ^done,start="0x{{[0-9a-f]+}}",end="0x{{[0-9a-f]+}}",file="{{.*}}data-info-line.c",line="{{[0-9]+}}" diff --git a/lit/tools/lldb-mi/data/inputs/data-info-line.c b/lit/tools/lldb-mi/data/inputs/data-info-line.c deleted file mode 100644 index 61c3710bf203..000000000000 --- a/lit/tools/lldb-mi/data/inputs/data-info-line.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(void) { - int x = 0; - return 12345 + x; -} diff --git a/lit/tools/lldb-mi/data/lit.local.cfg b/lit/tools/lldb-mi/data/lit.local.cfg deleted file mode 100644 index df9b335dd131..000000000000 --- a/lit/tools/lldb-mi/data/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.test'] diff --git a/lit/tools/lldb-mi/exec/exec-continue.test b/lit/tools/lldb-mi/exec/exec-continue.test deleted file mode 100644 index d51393e5c716..000000000000 --- a/lit/tools/lldb-mi/exec/exec-continue.test +++ /dev/null @@ -1,17 +0,0 @@ -# RUN: %build %p/inputs/main.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -exec-continue command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-continue -# CHECK: ^running diff --git a/lit/tools/lldb-mi/exec/exec-finish.test b/lit/tools/lldb-mi/exec/exec-finish.test deleted file mode 100644 index b2a50c5267fd..000000000000 --- a/lit/tools/lldb-mi/exec/exec-finish.test +++ /dev/null @@ -1,30 +0,0 @@ -# RUN: %build %p/inputs/main.c -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -exec-finish command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --break-insert dummyFunction -# CHECK: ^done,bkpt={number="2" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-finish --thread 0 -# Check that exec-finish can process the case of invalid thread ID. -# CHECK: ^error,msg="Command 'exec-finish'. Thread ID invalid" - --exec-finish --thread 1 -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-finish -# Check exec-finish in a selected thread. -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" diff --git a/lit/tools/lldb-mi/exec/exec-interrupt.test b/lit/tools/lldb-mi/exec/exec-interrupt.test deleted file mode 100644 index 2c063236d7f5..000000000000 --- a/lit/tools/lldb-mi/exec/exec-interrupt.test +++ /dev/null @@ -1,17 +0,0 @@ -# RUN: %build %p/inputs/main.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -exec-interrupt command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-interrupt -# CHECK: ^error,msg="Process is not running." diff --git a/lit/tools/lldb-mi/exec/exec-next-instruction.test b/lit/tools/lldb-mi/exec/exec-next-instruction.test deleted file mode 100644 index abd4e526375f..000000000000 --- a/lit/tools/lldb-mi/exec/exec-next-instruction.test +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: %build %p/inputs/main.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -exec-next-instruction command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-next-instruction --thread 0 -# Check that exec-next-instruction can process the case of invalid thread ID. -# CHECK: ^error,msg="Command 'exec-next-instruction'. Thread ID invalid" - --exec-next-instruction --thread 1 -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" - --exec-next-instruction -# Check exec-next-instruction in a selected thread. -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" diff --git a/lit/tools/lldb-mi/exec/exec-next.test b/lit/tools/lldb-mi/exec/exec-next.test deleted file mode 100644 index 87d9d44bb582..000000000000 --- a/lit/tools/lldb-mi/exec/exec-next.test +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: %build %p/inputs/main.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -exec-next command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-next --thread 0 -# Check that exec-next can process the case of invalid thread ID. -# CHECK: ^error,msg="Command 'exec-next'. Thread ID invalid" - --exec-next --thread 1 -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" - --exec-next -# Check that exec-next can step over in a selected thread. -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" diff --git a/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test b/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test deleted file mode 100644 index 98dc75f509cd..000000000000 --- a/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test +++ /dev/null @@ -1,6 +0,0 @@ -# RUN: %lldbmi < %s | FileCheck %s - -# Test that -exec-run command won't hang in case of wrong name of binary file. - --file-exec-and-symbols name.exe -# CHECK: ^error,msg="Command 'file-exec-and-symbols'. Target binary 'name.exe' is invalid. diff --git a/lit/tools/lldb-mi/exec/exec-step-instruction.test b/lit/tools/lldb-mi/exec/exec-step-instruction.test deleted file mode 100644 index 0613fb5c7934..000000000000 --- a/lit/tools/lldb-mi/exec/exec-step-instruction.test +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: %build %p/inputs/main.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -exec-step-instruction command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-step-instruction --thread 0 -# Check that exec-step-instruction can process the case of invalid thread ID. -# CHECK: ^error,msg="Command 'exec-step-instruction'. Thread ID invalid" - --exec-next-instruction --thread 1 -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" - --exec-step-instruction -# Check exec-step-instruction in a selected thread. -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" diff --git a/lit/tools/lldb-mi/exec/exec-step.test b/lit/tools/lldb-mi/exec/exec-step.test deleted file mode 100644 index 976afb33bcd4..000000000000 --- a/lit/tools/lldb-mi/exec/exec-step.test +++ /dev/null @@ -1,27 +0,0 @@ -# RUN: %build %p/inputs/main.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -exec-step command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --break-insert main -# CHECK: ^done,bkpt={number="1" - --exec-run -# CHECK: ^running -# CHECK: *stopped,reason="breakpoint-hit" - --exec-step --thread 0 -# Check that exec-step can process the case of invalid thread ID. -# CHECK: ^error,msg="Command 'exec-step'. Thread ID invalid" - --exec-step --thread 1 -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" - --exec-step -# Check that exec-step can step-in in a selected thread. -# CHECK: ^running -# CHECK: *stopped,reason="end-stepping-range" diff --git a/lit/tools/lldb-mi/exec/inputs/main.c b/lit/tools/lldb-mi/exec/inputs/main.c deleted file mode 100644 index b9d8f9d16f4d..000000000000 --- a/lit/tools/lldb-mi/exec/inputs/main.c +++ /dev/null @@ -1,9 +0,0 @@ -void dummyFunction() { - int a = 0; -} - -int main(void) { - int x = 0; - dummyFunction(); - return x; -} diff --git a/lit/tools/lldb-mi/exec/lit.local.cfg b/lit/tools/lldb-mi/exec/lit.local.cfg deleted file mode 100644 index df9b335dd131..000000000000 --- a/lit/tools/lldb-mi/exec/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.test'] diff --git a/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.c b/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.c deleted file mode 100644 index 74e627645406..000000000000 --- a/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.c +++ /dev/null @@ -1,3 +0,0 @@ -void HelpFunction(void) { - int x = 12345; -} diff --git a/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.h b/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.h deleted file mode 100644 index 05edab992a5f..000000000000 --- a/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.h +++ /dev/null @@ -1 +0,0 @@ -void HelpFunction(void); diff --git a/lit/tools/lldb-mi/symbol/inputs/main.c b/lit/tools/lldb-mi/symbol/inputs/main.c deleted file mode 100644 index f21edf3230a5..000000000000 --- a/lit/tools/lldb-mi/symbol/inputs/main.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "symbol-list-lines.h" - -int main(void) { - int x = GetZero(); - return 0; -} diff --git a/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.c b/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.c deleted file mode 100644 index 761f793548b6..000000000000 --- a/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "list-lines-helper.h" - -int GetZero() { - HelpFunction(); - return 0; -} diff --git a/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.h b/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.h deleted file mode 100644 index 1b74ff621ecb..000000000000 --- a/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.h +++ /dev/null @@ -1 +0,0 @@ -int GetZero(); diff --git a/lit/tools/lldb-mi/symbol/lit.local.cfg b/lit/tools/lldb-mi/symbol/lit.local.cfg deleted file mode 100644 index df9b335dd131..000000000000 --- a/lit/tools/lldb-mi/symbol/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.test'] diff --git a/lit/tools/lldb-mi/symbol/symbol-list-lines.test b/lit/tools/lldb-mi/symbol/symbol-list-lines.test deleted file mode 100644 index 792f283db1bb..000000000000 --- a/lit/tools/lldb-mi/symbol/symbol-list-lines.test +++ /dev/null @@ -1,17 +0,0 @@ -# RUN: %build %p/inputs/main.c %p/inputs/symbol-list-lines.c %p/inputs/list-lines-helper.c --nodefaultlib -o %t -# RUN: %lldbmi %t < %s | FileCheck %s - -# Test lldb-mi -symbol-list-lines command. - -# Check that we have a valid target created via '%lldbmi %t'. -# CHECK: ^done - --symbol-list-lines invalid_file.c -# Check a case of invalid file name. -# CHECK: ^error,msg="File Handler. Invalid file name path" - --symbol-list-lines symbol-list-lines.c -# CHECK: ^done,lines=[{pc="0x{{[0-9A-Fa-f]+}}",line="3"},{pc="0x{{[0-9A-Fa-f]+}}",line="4"},{pc="0x{{[0-9A-Fa-f]+}}",line="5"}{{.*}}] - --symbol-list-lines list-lines-helper.c -# CHECK: ^done,lines=[{pc="0x{{[0-9A-Fa-f]+}}",line="1"},{pc="0x{{[0-9A-Fa-f]+}}",line="2"},{pc="0x{{[0-9A-Fa-f]+}}",line="3"}{{.*}}] diff --git a/lit/tools/lldb-mi/target/inputs/main.c b/lit/tools/lldb-mi/target/inputs/main.c deleted file mode 100644 index 8c74b3496f7c..000000000000 --- a/lit/tools/lldb-mi/target/inputs/main.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(void) { - int x = 0; - return x; -} diff --git a/lit/tools/lldb-mi/target/inputs/target-select-so-path.py b/lit/tools/lldb-mi/target/inputs/target-select-so-path.py deleted file mode 100644 index 5eb07d84237c..000000000000 --- a/lit/tools/lldb-mi/target/inputs/target-select-so-path.py +++ /dev/null @@ -1,50 +0,0 @@ -import os -import sys -import subprocess -from threading import Timer - - -hostname = 'localhost' - -(r, w) = os.pipe() -kwargs = {} -if sys.version_info >= (3,2): - kwargs['pass_fds'] = [w] - -args = sys.argv -# Get debugserver, lldb-mi and FileCheck executables' paths with arguments. -debugserver = ' '.join([args[1], '--pipe', str(w), hostname + ':0']) -lldbmi = args[2] -test_file = args[3] -filecheck = 'FileCheck ' + test_file - -# Run debugserver, lldb-mi and FileCheck. -debugserver_proc = subprocess.Popen(debugserver.split(), **kwargs) -lldbmi_proc = subprocess.Popen(lldbmi, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, shell=True) -filecheck_proc = subprocess.Popen(filecheck, stdin=subprocess.PIPE, - shell=True) - -timeout_sec = 30 -timer = Timer(timeout_sec, exit, [filecheck_proc.returncode]) -try: - timer.start() - - # Get a tcp port chosen by debugserver. - # The number quite big to get lldb-server's output and to not hang. - bytes_to_read = 10 - port_bytes = os.read(r, bytes_to_read) - port = str(port_bytes.decode('utf-8').strip('\x00')) - - with open(test_file, 'r') as f: - # Replace '$PORT' with a free port number and pass - # test's content to lldb-mi. - lldbmi_proc.stdin.write(f.read().replace('$PORT', port).encode('utf-8')) - out, err = lldbmi_proc.communicate() - filecheck_proc.stdin.write(out) - filecheck_proc.communicate() -finally: - timer.cancel() - -debugserver_proc.kill() -exit(filecheck_proc.returncode) diff --git a/lit/tools/lldb-mi/target/lit.local.cfg b/lit/tools/lldb-mi/target/lit.local.cfg deleted file mode 100644 index df9b335dd131..000000000000 --- a/lit/tools/lldb-mi/target/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.test'] diff --git a/lit/tools/lldb-mi/target/target-select-so-path.test b/lit/tools/lldb-mi/target/target-select-so-path.test deleted file mode 100644 index 785030bf2fd3..000000000000 --- a/lit/tools/lldb-mi/target/target-select-so-path.test +++ /dev/null @@ -1,25 +0,0 @@ -# UNSUPPORTED: windows, darwin -# -# RUN: %clang -o %t %p/inputs/main.c -g -# RUN: %python %p/inputs/target-select-so-path.py "%debugserver" "%lldbmi %t" %s - -# Test that -target-select command can hook up a path -# added by gdb-set solib-search-path. - -# Check that we have a valid target created via file-exec-and-symbols. -# CHECK: ^done - --interpreter-exec console "target modules search-paths list" -# CHECK ^done - --gdb-set solib-search-path /example/dir -# CHECK: ^done - --target-select remote localhost:$PORT -# CHECK: ^connected - --interpreter-exec console "target modules search-paths list" -# CHECK: ~"[0] \".\" -> \"/example/dir\"\n" -# CHECK-NEXT: ^done - --gdb-exit |