Files
clang-p2996/lldb/test/API/tools/lldb-dap/threads/main.c
Walter Erquinigo 1654d7dc38 [lldb-dap] Add an option to provide a format for threads (#72196)
When this option gets enabled, descriptions of threads will be generated
using the format provided in the launch configuration instead of
generating it manually in the dap code. This allows lldb-dap to show an
output similar to the one in the CLI.
This is very similar to https://github.com/llvm/llvm-project/pull/71843
2023-11-14 13:23:55 -05:00

22 lines
381 B
C

#include <pthread.h>
#include <stdio.h>
int state_var;
void *thread(void *in) {
state_var++; // break here
return NULL;
}
int main(int argc, char **argv) {
pthread_t t1, t2;
pthread_create(&t1, NULL, *thread, NULL);
pthread_join(t1, NULL);
pthread_create(&t2, NULL, *thread, NULL);
pthread_join(t2, NULL);
printf("state_var is %d\n", state_var);
return 0;
}