title: How does a debugger peek into another process' memory?
body: <p>When every process has its own private memory space that no external process has access to, how does a debugger access a process' memory space?  </p>
  
  <p>For eg, I can attach gdb to a running process using <code>gdb -p &lt;pid&gt;</code><br>
  The I can access all the memory of this process via gdb.  </p>
  
  <p>How is gdb able to do this?</p>
  
  <p>I read the relevant questions in SO and no post seems to answer this point.</p>