Check out example codes for "debugging c++". It will help you in understanding the concepts better.
Code Example 1
Run the code with gdb ./yourCode Use 'run' command to start the program. When it crashes use 'bt'(back trace) command to find where it happened.
Learn ReactJs, React Native from akashmittal.com