title: Retrieving current stack pointer from /proc/pid/stat
body: <p>I'm executing a basic C program using gdb. I have a break point at the start of <code>main()</code>. After running the code, gdb breaks at main() as expected. 
  Now if I examine the stack pointer register (rsp), i'm seeing</p>
  
  <pre><code>0x7fffffffe170: 0x00000000. 
  </code></pre>
  
  <p>When I retrieve the same information using <code>cat /proc/17232/stat | cut -d" " -f29/proc</code> (where 17232 is pid for this process), I'm seeing: </p>
  
  <pre><code>140737488347112 (which in hex is: 0x7fffffffdfe8). 
  </code></pre>
  
  <p>How come we see a different value of current stack pointer from gdb. And also, why gdb is showing contents of rsp as NULL (0x00000000)? </p>
  
  <p>Thanks.</p>