C debug problem
When I compile and link my hello world proggy with -g option using gcc, I can see the source in gdb.
gcc -g -o hello helloworld.c However ... when I compile with -g and generate a helloword.o and then link in a separate step I cannot see the source in gdb. gcc -g -o helloworld.o helloworld.c gcc -g -o hello helloworld.o Am I missing a link option? Does anybody have a clue? Any help will be appreciated. tia |
ummm... what do you mean by source? the helloworld.c file? or the helloworld.o object file?
|
I can't see the helloworld.c source code. I can't single step or look at variables.
|
I think u should use the -c flag instead of -g to create the helloworld.o file.
The code would be : gcc -c -o helloworld.o helloworld.c gcc -g -o hello helloworld.o |
no... that's not exactly what she's asking... she's using the gbd (gnu debugger) to check the program. i've never used it... so i can't really offer any advice on it.
|
All times are GMT -5. The time now is 07:48 AM. |