1 a The answer is either "That Thing You Do" or run. b run funkyarg1 funkyarg2 c break wackfile.c:12 breaks at wackfile.c, line 12 If gdbing in emacs, hit C-x [space] to set a breakpt on the current line, or just b wackfile.c:12 d next or just n e step or just s f continue or just c g print psychovar or just p psychovar (optional in hex) p /x psychovar h break wackfile.c:12 if (argomatic2000 = 50) i backtrace or just bt j quit or just launch missles at PG+E nuclear reactor k (optional) bt to see the stack, up as many times as needed to hop out of the function calls to the caller, then p psychovar 2 run C-c (twice if in emacs) jump [whatever that line was] 3 Set b as approriate run disp *(int *)my_list->head->item and tail a c 6, displays 32,0 b c 12, displays 33, 0 c c 9, displays 12, 0 run disp my_list->head and tail a c 9, answers may vary b c 7, answers may vary 4 run a a a a a a bt shows 10 - 2 calls to PrintArg, so the answer is 8 random is 13 many ways to fix NOTE TO READERS ON GRADING STANDARD, ETC.: Add up points as follows: Transcripts (effort): +1 legit gdb transcripts for 1-2 questions (do not have to be correct) +2 legit gdb transcripts for all 3 questions (again, can be wrong) 0 on entire assignment if any transcript is not legit; just b/c it is hw doesn't mean academic dishonesty is tolerated 1 on entire assignment if they at least cited printf as a "source" There are many valid answers for this assignment, so accept anything that works. Question 1 +0.2 for each correct answer, up to a max of 2.0 Question 2 Transcripts may start to get messy... you may want to grep -n '(gdb)' hw5-2.txt to filter out some of the noise. +2 if right 0 otherwise Question 3 +0.2 for each head, tail, head->item, or tail->item correct Students were instructed to put answers at top of hw5-3.txt. If they didn't and answers are hard to find, you may -0.4 Question 4 +0.8 correct #calls +0.8 correct random value +0.4 fix Students were instructed to put answers at top of hw5-4.txt. If they didn't and answers are hard to find, you may -0.4 ---------- ??.? Total if grading according to this standard seems too long, readers should notify cs61c-ta I think that's it