怎么调用gdb
gdb program
gdb program corefile <=> gdb program -c corefile
gdb program 1234
would attach gdb to process 1234 (unless you also have a file named 1234; gdb does check for a core file first).
gdb --args gcc -O2 -c foo.c
This will cause gdb to debug gcc, and to set gcc's command-line arguments to `-O2 -c foo.c'.
gdb -silent
gdb + atta