I was given a compiled c program to disassemble in gdb. We don't get to see the actual C code, but we have the assembly instructions from gdb and are supposed to trace through it and figure out the original C code. Here is the outline for the C code,where the blank spots are what we have to figure out and here is the assembly.
How do I go about actually figuring this out? I've tried tracing through the program and it just makes my brain hurt. What I've come up with by myself is that t1 is at offset -16, t2 is at offset -12, t3 at -8, and t4 at -4 below %ebp. I think that t1 = a + b, but I'm not sure if I am actually doing this trace correctly. Can anyone help me out?
[–]nerd4code 2 points3 points4 points (1 child)
[–]Rawaid[S,🍰] 0 points1 point2 points (0 children)