[C] Debugging Segment Error with gdb in Linux

1. Compile the source with -g option.

2. run gdb

(gdb) file exefile
(gdb) run [arg is optional]

After segment error occurs, type ‘up’ until you see the proper source file & line where the segment occurs.

(gdb) up
(more…)

Read More