Question: Need this done in C coding. NOT C + + just C coding for beginners please. Using GDB to examine a core - dump file

Need this done in C coding. NOT C++ just C coding for beginners please.
Using GDB to examine a core-dump file
Instructions:
Download the .c source code in Laulima > Resources > hw21.c
Compile this code using gcc.
Run it. A runtime error should occur with an error message "Segmentation Fault (core dumped)"
In order to understand this error, you should do the following:
Re-compile the source code while enabling debugging using gdb. Compile still used the
command gcc and include the '-g' flag.
Use gdb to solve the error(s) in the code. In order to do this you will have to use the 'core
core.filename' command to investigate what issues caused the "segmentation fault (core
dumped)" error. If you are unsure, follow instructions on slide 10(slidepack 22).
Remember the core dump file is the saved state of main memory when the runtime error occurred...
Deliverables:
1.) Answer the following questions. Please save the terminal session output to show both (a)
evidence on GDB commands you entered and...
(b) the response from GDB:
Why did the value of 'i' exceed 9000?
Can you describe (in a sentence) what caused the error?
Explain in terms of memory allocation for the array.
Need this done in C coding. NOT C + + just C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!