Gineann gcc -g faisnéis dífhabhtaithe atá le húsáid ag dífhabhtóir GDB.
rogha | tuairisc |
---|---|
-g0 | aon fhaisnéis dífhabhtaithe |
-g1 | faisnéis dhífhabhtaithe íosta |
-g | faisnéis dhífhabhtaithe réamhshocraithe |
-g3 | faisnéis dhífhabhtaithe uasta |
$ gcc -glevel [options] [source files] [object files] [-o output file]
Scríobh comhad foinse myfile.c :
// myfile.c
#include <stdio.h/
void main()
{
printf("Program run!!\n");
}
Tóg myfile.c ar an teirminéal agus rith gdb chun dífhabhtaithe:
$ gcc -g myfile.c -o myfile
$ gdb myfile
(gdb) run
Starting program: /home/ubuntu/myfile
Program run!!
Program exited with code 012.
(gdb) quit
$