Ahmed Shabana wrote:
> Thanks every one I just catch the problem
> I use the GDB and it helps me so much
> 
> I will share to you some knowledge that I just learn about gdb
> 
> a) you must turn on the system core dump ( I use linux )
>       $ ulimit -c unlimited
> b) Then compile your code
> c) run it and if you have a segmentation fault it will print a message
> "Segmentation fault (core dump)"
>  (!) NOTE : you must have write permission in this current working
> directory to generate this core file
> d) to obtain the core file just
>     $ ls core*
> e) try now to make use of gdb ; run it like this
>     $gdbtui $your_executable_file $core_file
> c) you can now debug using those commands
>     run : to run the program
>     print $variable: to print a variable value
> 
> Sorry for interrupt

OR you could compile gdb support into the executable (-g option) and 
then execute the program directly with gdb.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to