tags:

views:

308

answers:

1

I've compiled my C program using gcc 4.4.1 using the flag -g, but when I try to step through one of my functions in gdb version 7.0, I get the message: "Single stepping until exit from function _DictionaryTree_getNodeList, which has no line number information."

Can someone tell me why this is happening?

+4  A: 

Just guessing, but is _DictionaryTree_getNodeList in another file that wasn't compiled with -g?

Arthur Kalliokoski
Yes, I figured it out before I even read your answer. Good guess ;)
Steven Oxley
If you are compiling multiple files, it's better to use a Makefile and add -ggdb in the gcc option flags.
Manav MN
@Manav MN yeah, that's what I have, but I have two different commands - one for compiling and one for linking and I forgot to add the flag to the one for compiling (which is actually the only one I needed it for, I guess).
Steven Oxley