no line information when dubugging with gdb
Asked by
tzvibish
Ok, I'm trying to get a simple C program to debug in GDB.
#include <stdio.h>
int main (int argc, char *argv[])
{
printf ("Hello world!\n");
return 0;
}
From the command-line I use
gcc main.c -o exec
to make an executable.
Then
gdb
file exec
b main
Then, when I try to print the lines of code using list, I get
(gdb) l
1 /build/
Or, if i step after the breakpoint,
(gdb) l
1 /build/
What am I missing here?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu kdevelop Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask tzvibish for more information if necessary.
To post a message you must log in.