I have the following assembly:
_start:    
    mov $strings,   %rbx
    mov $1,         %r12d
  print_loop:
    mov %rbx,       %rdi
It is simple enough, but here is what it shows in gdb for each of these three lines/instructions:
- mov $strings, %rbx- 0x00000000004000c4 ? mov $0x6000ea,%rbx # memory address of 'strings' ─── Stack ────────────────────────────────────────────────────────────────────────────────────────────────────── [0] from 0x00000000004000c4 in _start
- mov $1, %r12d- 0x00000000004000cb ? mov $0x1,%r12d ─── Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────── [0] from 0x00000000004000cb in _start
- But then on the third instruction -- the first one after the label -- things look wonky: - 0x00000000004000d1 ? mov %rbx,%rdi ─── Stack ─────────────────────────────────────────────────────────────────────────────────────────────────────── [0] from 0x00000000004000d1 in print_loop [1] from 0x0000000000000001 [2] from 0x00007fffffffe5aa [3] from 0x0000000000000000
What does that mean exactly, and why does it show things like that? It seems like the stack should still show one line:
[0] from 0x00000000004000d1 in print_loop
- or - 
[0] from 0x00000000004000d1 in _start
 
    