title: Stack examining with GDB. What is x/[n][x] $[reg]?
body: <p>I am new to GDB and how software works on a low level. 
  Currently I am reading book «HACKING the art of expoitation» by Jon Erickson.
  I know what is stack, what is stack pointer, base pointer and etc. I can easily understarnd <code>info stack</code> command, but what is <code>x/[n][x] $[reg]</code>?
  Example from book: </p>
  
  <pre><code>0x08048344 &lt;test_function+0&gt;: push ebp  
  0x08048345 &lt;test_function+1&gt;: mov ebp,esp  
  0x08048347 &lt;test_function+3&gt;: sub esp,0x28  
  0x0804834a &lt;test_function+6&gt;: mov DWORD PTR [ebp-12],0x7a69  
  0x08048351 &lt;test_function+13&gt;: mov BYTE PTR [ebp-40],0x41  
  0x08048355 &lt;test_function+17&gt;: leave  
  0x08048356 &lt;test_function+18&gt;: ret  
  ...  
  (gdb) x/16xw $esp  
  0xbffff7c0: 0x00000000 0x08049548 0xbffff7d8 0x08048249
  0xbffff7d0: 0xb7f9f729 0xb7fd6ff4 0xbffff808 0x080483b9
  0xbffff7e0: 0xb7fd6ff4 0xbffff89c 0xbffff808 0x0804838b
  0xbffff7f0: 0x00000001 0x00000002 0x00000003 0x00000004
  </code></pre>
  
  <p>What is that? As I know this command shows 16 last var's addresses stored in stack.<br>
  But what is <code>0xbffff7c0 0xbffff7d0 0xbffff7ce</code>? How to read it? and why there is a 10 byte shift always?</p>
  
  <p>Explain please.</p>