Question: linux> gdb problem1 (gdb) break *p1 Breakpoint 1 at 0x400660 (gdb) run Breakpoint 1, 0x00400660 in p1 () (gdb) disas =>0x00400660 : movslq 0x1c(%rdi),%rax 0x00400664
linux> gdb problem1
(gdb) break *p1
Breakpoint 1 at 0x400660
(gdb) run
Breakpoint 1, 0x00400660 in p1 ()
(gdb) disas
=>0x00400660 <+0>: movslq 0x1c(%rdi),%rax
0x00400664 <+4>: movslq %esi,%rsi # ignore this instruction
0x00400667 <+7>: movl $0x3c,0xc(%rdi)
0x0040066e <+14>: movl $0x5a,(%rdi,%rax,4)
0x00400675 <+21>: movl $0x50,-0x4(%rdi,%rsi,4)
0x0040067d <+29>: mov 0xc(%rdi),%eax
0x00400680 <+32>: retq
(gdb) print/x $rdi
$1 = 0x7fffffffe960
(gdb) x/8d $rdi # prints 32 bytes as 8 integers
0x7fffffffe960: 70 60 50 40
0x7fffffffe970: 30 20 10 0
(gdb) print/d $rsi
$1 = 8
Fill in the table below. Keep in mind the values in the array that starts at memory location 0x7fffffffe960. If the destination of an instruction is a memory location, write the memory address as a hex number. You may write only the last 4 digits of the address; for example,!0x7fffffffe960 may be written as e960. In your answers, assume the instructions run in sequence; thus, any changes in memory or register contents persist from one instruction to the next.
Line Destination Old value New value
p1+0
p1+7
p1+14
p1+21
p1+29
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
