This lab will give you experience using
gdb to debug programs. Clone
your lab repository, then make a solutions file named
write your answers in.
Create and commit a
.gitignore file that ignores all compiled files
and other crud. These items include, but are not limited to:
You will lose points if you leave junk in your submission on
GitLab. Remember that you can remove files that you previously
maketo compile the code. Now run it. You should get a segfault.
runyour code again and
Ctrl-Cto halt execution.
runthe code a few times and print the value of
iter. What is happening to the addresses in the linked list?
Write a paragraph or two about your experience with
gdb. What did
you like? What didn’t you like? What other features would be useful
for a debugger1?
You will be graded on:
As always, your git repo on http://git-classes.mst.edu is your submission. Don’t forget to commit and push all relevant files. Make sure you see everything you expect on GitLab!
We expect to see the following files on your master branch:
Notice that your repository has subdirectories! You have the
option to put
.gitignore files in the subdirectories if you
prefer. Just make sure you’re not committing junk files.
gdb has more features that we covered. This question is asking you what features would be useful to you as a programmer, regardless whether
gdb can do it or not. ↩