DonnumS
DonnumS

Reputation: 316

Problems with gdb: No debugging symbols found

I have a problem when it comes to running gdb. I've been given two files. the source code hello.c and a 64-bit ELF called hello

I want to run gdb but when I run gdb ./hello I get the message (No debugging symbols found in hello)

I can't seem to find out why this happens, and I can't find anyone that has had the same problem before where the, this case hello file is given. Any help is greatly appreciated!

Upvotes: 1

Views: 4566

Answers (1)

tutorialadda.com
tutorialadda.com

Reputation: 34

compile the program again with the -g flag.

gcc -g -o hello hello.c

Run gdb with generated executable:

gdb ./hello

now you are able to see this kind of message:

Type "apropos word" to search for commands related to "word"... Reading symbols from ./hello...done. (gdb)

Upvotes: 2

Related Questions