Question: I can run the the program and set the breakpoint at ll_equall() and run. I do not know what do after that and how to

I can run the the program and set the breakpoint at ll_equall() and run. I do not know what do after that and how to fix the program or what is wrong with the program.

I can run the the program and set the breakpoint at ll_equall()

and run. I do not know what do after that and how

to fix the program or what is wrong with the program. Consider

Consider the program 11_equal.c. Compile and run the program, and experiment with it. By default, it will give you the following result: gcc -g-o 1l_equal 1l_equal.c ./11_equal equal test 1 result1 Segmentation fault Figure out what's causing that segmentation fault! Start gdb on the program, following the instructions for compilation in exercise 1. We recommend setting a breakpoint in the 11_ equal () function. When the debugger stops at the breakpoint, try stepping through the program to see if you can figure out what's causing the error Hint: pay attention to the values of the pointers a and b in the function (print them!). Are they always pointed to the right address? Hint 2: Look at the source code in main to see the structure of the nodes and what exactly is being passed into 11_equal ILequal.c #include a typedef struct node t int val; struct node* next; 6node; 8 /FIXME: this function is buggy.*/ 9 int 11_equal(const node* a, const node* b) while (a != NULL) { if (a->val!-b->val) return 0; a a->next; bb->next; 14 /lists are equal if a and b are both null return ab; 16 18 19 20 /*The main function exists just to test 1L equal. 21 There are two tests. The second one is by default buggy. Please find the error and fix it!*/ 23 int main(int argc, chark* argv) 24 25 26 27 28 29 30 int i; node nodes [10] (1-0 ; nodes [i].val- 0; nodes [i].next NULL; for i

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 Databases Questions!