not only "-ggdb", or ? Reproducible: Always
Read the sentence above this Code Listing "The basic flag to add in this case is -g. That tells the compiler to include extra information in objects, such as filenames and line numbers" So there is no need to add -g on the code.