Starting from:
$29.99

$23.99

Assignment 4 Solution

Background

In this assignment, you will use emacs/vim/nano, and make to modify c++ programs and introduce gdb, a debugging tool. 



Part I. Download program source files for this assignment from dropbox myname.cpp.

Part II: myname program

1.   (1 point) Using your choice of text editor, modify the source code to print out your name instead of mine when the binary file is executed.

 

2.   (1 point) Modify the makefile to include a rule that creates a backup of the source files, makefile and readme in an archive directory in your home dir structure. Submit a compressed, archived tar file (you.assignment4.tar.[Z,gz]) with your modified source code.

 

3.   (1 point) Use the debugger gdb to step through the program. Check to ensure the Makefile is modified to allow for debugging. Submit a text file containing the gdb output for the following sequence of commands: 
gdb mynamestartstep [ issue this command multiple times until you get the "Program exited normally" message.]quit

When you have finished, submit the tar ball file in dropbox.

More products