Lab Assignment--Compile and Debug


Part 1-Makefile

Write a Makefile for the oneline program from last/this week's lab.

Part 2-Memory Leak

If you submitted code with a memory leak, here is your opportunity to fix your code.

  1. Run the code through valgrind and document what you think the problem is.
  2. Document any changes that you make to the code and why you have done that
  3. Once you have no memory leaks, capture it in a script or by using >& valgrind.out after the valgrind command.

If you had no memory leaks:

  1. Capture it in a script or by using >& valgrind.out after the valgrind command.
  2. Document challenges you faced and what solutions you found.

Part 3-Debugging

  1. Capture a script of you running the debugger on the command-line:

Deliverables: 3 code files, 1 makefile, 1 text file, and 1 to 3 script files

  1. Makefile for the oneline project.
  2. Script of the building and running the oneline program using the makefile.
  3. Script or file of valgrind output with no errors or memory leaks
  4. Script of gdb
  5. Text document explaining challenges you faced or what you have fixed in the code to get rid of memory leaks and/or core dumps
  6. Code for the oneline project (with no core dumps or memory leaks).

Notes