main calls add(2, 3). Press Next to run one instruction at a time. The stack hangs from the ceiling and grows downward, so higher addresses are at the top.
C++
Assembly
The stack (memory)
↑ higher addressesRegisters (inside the CPU)
Addresses here are short made-up numbers. Real stack addresses look like 0x7ff7bfeff6a8.
The -O0 version is built with -mno-red-zone so add makes room the normal way. In asmview, a function that calls nothing (like add) often skips sub rsp and uses the space below rsp directly. That shortcut is called the red zone.