c - Gdb repeated "no symbol table is loaded" -


OK, I can not use gdb to try despite a lot of solutions.

My makefile cc -g _________ and myfilesys

  & gt; gdb breaks myfilesys (gdb) my_linked_list.c: 90A symbol table is not loaded, read the symbol from the "file" command ... (gdb) file myfilesys / home / jsexton / work / cs492 / hw3 / myfilesys ... Use (No debugging symbols found) ... done. (GDB) break my_linked_list.c: 90 A symbolic table is full, use the "file" command ...   

Can anyone see a problem? My program is 30C C is broken into files, so I really need to use the file: [line number] thing.

Although you have myfilesys on your executable cc -g < If you claim to be compiled with / code>, then there is no proof in your attempt to use GDB, code> file command:

(gdb ) File myfilesys
/.../ Reading symbols from myfilesys ... (no debugging signal found) ... done.

You have to take on your word that you have actually used cc -g to compile the code myfilesys It means that you have either stripped the symbols from your binary (I am not likely, but I mention the possibility), or none of your object files is debug. Belonging to the latter, you have to implement the cc -g -c compilation in each individual source file. Then, each of the resulting object files will have debugging signals, and consequently the executable will also have debugging signals (unless you remove them in the bar after linking).

Standard makefiles such as GMK , it can usually be accomplished with the -g by increasing the CFLAG variable. Below is a complete Mesophile that shows it with three source files:

  cflag = - g myfiles: come b $ $ (cc) $ ^ -o $ @   

GCC already has the rules inherent, which can make the .o file related to the .c file. However, you can change the CFLAGS variable to change the command line argument passed to the compiler. The directory is pre-processing and usually teaches CPPFALAGS variables (C + + specific flag with CXXFLAGS , but CPPFALGS option C and C + + Compiler got to both of them).

We need to define a clear rule to make the executable myfilesys ( $ (CC) rule a tab character, a makefile requirement Is indented with) After typing create , there will be symbols in the executable, and GDB will not report missing symbols in your executable (it can report missing symbols from any library you use ):

(gdb) file myfilesys
/.../ Reading symbols from myfilesys ... done.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -