Tag: 步入

gdb – 按预定义规则跳过某个文件的进一步步骤?

假设我有这个文件: xb@dnxb:/tmp/c$ cat helloworld.h void hello(); xb@dnxb:/tmp/c$ cat helloworld.c #include void hello() { printf(“Hello world!\n”); printf(“Next line\n”); } xb@dnxb:/tmp/c$ cat main.c #include #include “helloworld.h” int main(void) { hello(); return 0; } 并编译: xb@dnxb:/tmp/c$ gcc -g3 -shared -o libhello.so -fPIC helloworld.c -std=c11 xb@dnxb:/tmp/c$ gcc -g3 main.c -o main -Wl,-rpath,”$PWD” -L. -lhello 然后用gdb调试: xb@dnxb:/tmp/c$ gdb -q -n […]