title: dereferencing a register gdb
body: <p>So i am trying to debug some code and all i have is the executable. I know that a register contains the address of what need to know. Is there a way I could print out the hex values from the start of that address to a given length?</p>
  
  <p>things I have tried:</p>
  
  <pre><code>x/s $ebp
  p (char) ($ebp)
  p (char) (*ebp &gt;&gt; 4 )
  p (char)*(%ebp  4 )
  p $($ebp)
  p  $(%ebp + $0x1)
  </code></pre>
  
  <p>Does normal pointer arithmetic not work with registers? What does it mean when it says "the history is empty</p>