I have a CS project that I need to diffuse a bomb (the Mr.Evil bomb if you have ever heard about it), but I am having problems with gdb when I want to set break points to lines. After I open the file in gdb and try to break a t a random line I get this problem:
gdb bomb
(gdb) break 15
No symbol table is loaded. Use the "file" command.
In addition, even when i use the "file" command I get
"/auto/bunter_usr/bomb": not in executable format: File format not recognized
I realized that the problem is because my professor has not used the -g flag when he has compiled the file. In the situation I am, is there a way to set breakpoints to lines?
"/auto/bunter_usr/bomb": not in executable format: File format not recognized
I realized that the problem is because my professor has not used the -g flag
Your realization is incorrect. An executable compiled without -g
would not produce above message.
Most likely, the file you are pointing GDB at is a shell script, which invokes the real executable (perhaps after setting some environment variables, or adding some command line flags). You want to debug the real executable, not the shell script.