gdb练习2——列出函数的名字
测试代码
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
void *thread_func(void *p_arg) {
while (1) {
sleep(10);
}
}
int main (int argc, char *argv[]) {
pthread_t t1, t2;
pthread_create(&t1, NULL, thread_func, "thread 1");
pthread_create(&t2, NULL, thread_func, "thread 2");
sleep(1000);
return 0;
}