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
22 lines
381 B
C
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;
|
|
}
|