Hello,
I am a new user to cgdb and I like it very mush. However, when I use
cgdb to debug a simple program today, it failed to return when my
program called scanf to get some information. my program are very
simple, it just read a integer from the standard input and then output
it. the source code is as follow:
1 #include<stdio.h>
2
3 int main(void)
4 {
5 int n;
6
7 scanf("%d",&n);
8
9 printf("the number you input is: %d\n", n);
10
11 return 0;
12 }
I set a breakpoint on line 7, and then type in "run" and "next" command
in the gdb window, and then i can input. However it don't return no
matter what I type in even when I type in ctrl+d. when I use gdb to
debug this program, there is such problem. I don't if there is something
wrong with cgdb or something wrong with my system. other more
information about my system is:
CGDB version: 0.6.5
gdb version: GNU gdb (GDB) 7.1-ubuntu
gcc version: 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
system: ubuntu-10.04
kernel: 2.6.36
Thanks& Regards
--justin
|