Question: Question 2.3: GDB Assume we have this functions: int strlen(char *ptr) The above function returns the length of a null terminating string. Assume a user

Question 2.3: GDB Assume we have this functions: int strlen(char *ptr) The above function returns the length of a null terminating string. Assume a user did not provide a null terminating string. Assume the user does not realize they did not provide a null terminating string. COMP 206 Vybihal Page 2 of 3 Write down all the commands from an imaginary GDB session showing how the programmer could use GDB to discover their error. (1) Show how they would compile their code to be compatible with GDB. (2) Show how they would launch GDB with their program. (3) Show a portion of the GDB session that locates and diagnoses the problem, demonstrating why this problem exists
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
