How do you fix a segmentation fault?

Asked by Winnie Olson

6 Answers

  1. Compile your application with -g , then you’ll have debug symbols in the binary file.
  2. Use gdb to open the gdb console.
  3. Use file and pass it your application’s binary file in the console.
  4. Use run and pass in any arguments your application needs to start.
  5. Do something to cause a Segmentation Fault.
Dwyane Johnson, BA Contributor
Dwyane Johnson
4.6/519 ratings

Leave your comment

Leave a Comment

Your email address will not be published. Required fields are marked *