Take the 2-minute tour ×  How do I debug a segmentation fault?
Basically this is what happens:  I run my server in background:
./server &  then I run my client: ./client  When I try to login
to my server, on correct username and password, everything is
okay, but when I type invalid user and password, it results in a
segmentation fault.  How do I make the compiler/debugger able to
output what error its actually see that causes segmentation core
dump.  I know gdb but I try using gdb client but it doesn't seem
to work.  share|improve this question may be post a question on
the problem you are facing with gdb –  arunmoezhi Aug 12 '12 at
9:24 And note that question marks are used to ask questions
(opposed to full stops). –  user529758 Aug 12 '12 at 9:29  3
Answers 3  up vote 3 down vote accepted  A good idea with
segmentation faults is to run the program with valgrind for
debugging. That way, you'll often get more detailed information
about what caused your segmentation fault. For example, it will
tell you if you