Q
questions?
I am a newbie in programming and was reading O'Reilly <<Practical C
programming>>
I was trying to play with the debugger. I am using gdb under Fedora.
I was trying to reproduce an error in the book. It is a binary search
program. In the program, I have a line which is
sscanf(line,"%d",data[index]), in front of data[index], it missed the
&. so it will produce a runtime error.
I compile with:
run with
It suppose to create a core file, but in my directory, I didn't see it.
How can I produce that file so that my debugger will load it?
Thank you very much for any comments
programming>>
I was trying to play with the debugger. I am using gdb under Fedora.
I was trying to reproduce an error in the book. It is a binary search
program. In the program, I have a line which is
sscanf(line,"%d",data[index]), in front of data[index], it missed the
&. so it will produce a runtime error.
I compile with:
gcc -o run -g search.c
run with
segmentation fault./run
It suppose to create a core file, but in my directory, I didn't see it.
How can I produce that file so that my debugger will load it?
Thank you very much for any comments