Starting from:

$30

Homework 2 : Assembly

Page 1
CSCI 247 Computer Systems I
Homework 2 : Assembly
You will use your newly acquired gdb skills to reverse engineer three C programs, which have been
compiled without the -d flag (hence the executables do not contain debugging information allowing you
to inspect each line of the equivalent plain-text program). However, you can disassemble the programs.
Outcomes
• Gain more experience in the use of gdb
• Become more familiar with assembly, including the use of control routines
You CAN work in groups of 2 in completing this assignment. In that case, only a single person
uploads .c files to Canvas, and the names of both people should be in the header of each file.
Retrieve the three executables hw2_prog1, hw2_prog2, and hw2_prog3 from the following directory:
/home/jagodzf/public_html/teaching/csci247/homeworks/hw2-assembly
Your task
• Use gdb to set breakpoints for each of the three executables; each program has a main method
• Disassemble each program
• Compose three program files, hw2_prog1.c, hw2_prog2.c, and hw2_prog3.c which are the
source code equivalents for the executables
Hints and suggestions
• Look up the opcodes (online) that you encounter in the disassembled programs
• Refer to the GDB tutorial pdf that is available for lab 3; consider using gdb’s layout asm
Rubric and Submission
Upload your hw2_prog1.c, hw2_prog2.c, and hw2_prog3.c file to Canvas.
Correctness Points
• hw2_prog1.c correctly reverse engineers hw2_prog1
• hw2_prog2.c correctly reverse engineers hw2_prog2
• hw2_prog3.c correctly reverse engineers hw2_prog3
10
15
20
Total 45 points
And, adhere to correct formatting. This is the quality component of code. You will be deducted points if
your code is not of high quality.

More products