Assembly code with examples:
---
stepi --- Step each instruction:
-----
lea -- assembly code operation
lea -0x40(%rbp),%rcx
(gdb) info registers rbp
rbp 0x7fd1cd6fc850 0x7fd1cd6fc850
(gdb) info registers rcx
rcx 0x7fd1cd6fc810 140539071547408
(gdb) p/x 0x7fd1cd6fc850- 0x40
$19 = 0x7fd1cd6fc810
----
lea (%rdi, %rdi, 4), %rax # set %rax to %rdi + %rdi * 4
(gdb) p/x $rax + $rcx * 8
$14203 = 0x480
(gdb) p/x $rbx
$14197 = 0x480
(gdb) p/x $rax
$14198 = 0x0
(gdb) p/x $rcx
$14199 = 0x90
0x0000560e660e05ab <+267>: lea (%rax,%rcx,8),%rbx
-----
Display current instruction:
(gdb) disp/i $pc
1: x/i $pc
=> 0x55fc7df2e297 <func [__be_func...]+39>: mov %rax,%rdi
------
Display 10 instructions from current instruction:
----------
(gdb) x/10i $pc