mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-13 13:45:16 +00:00
![Jordan Rupprecht](/assets/img/avatar_default.png)
Summary: Moves lldbsuite tests to lldb/test/API. This is a largely mechanical change, moved with the following steps: ``` rm lldb/test/API/testcases mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}} mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done ``` lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure. Reviewers: labath, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D71151
42 lines
817 B
C
42 lines
817 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
lldb_enable_attach();
|
|
|
|
int do_crash = 0;
|
|
int do_wait = 0;
|
|
|
|
int idx;
|
|
for (idx = 1; idx < argc; idx++)
|
|
{
|
|
if (strcmp(argv[idx], "CRASH") == 0)
|
|
do_crash = 1;
|
|
if (strcmp(argv[idx], "WAIT") == 0)
|
|
do_wait = 1;
|
|
}
|
|
printf("PID: %d END\n", getpid());
|
|
|
|
if (do_wait)
|
|
{
|
|
int keep_waiting = 1;
|
|
while (keep_waiting)
|
|
{
|
|
printf ("Waiting\n");
|
|
sleep(1); // Stop here to unset keep_waiting
|
|
}
|
|
}
|
|
|
|
if (do_crash)
|
|
{
|
|
char *touch_me_not = (char *) 0;
|
|
printf ("About to crash.\n");
|
|
touch_me_not[0] = 'a';
|
|
}
|
|
printf ("Got there on time and it did not crash.\n");
|
|
return 0;
|
|
}
|