title: How to use gdb python debugging extension inside virtualenv
body: <p>I'm running ubuntu, and installed the python-dbg package. When trying to use the installed version directly everything works great:</p>
  
  <pre><code>$ gdb python2.7-dbg
  GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
  ---x snipped x---
  Reading symbols from /usr/bin/python2.7-dbg...done.
  (gdb) r
  Starting program: /usr/bin/python2.7-dbg
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
  Python 2.7.3 (default, Feb 27 2014, 19:39:25)
  [GCC 4.6.3] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt;
  Program received signal SIGINT, Interrupt.
  0x00007ffff6997743 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:82
  82      ../sysdeps/unix/syscall-template.S: No such file or directory.
  (gdb) py-bt (&lt;--- works, just has nothing to do)
  (gdb)
  </code></pre>
  
  <p>So, I've been building a virtualenv using the package's binary <code>python2.7-dbg</code> (since some libraries need recompiling), using this command line:</p>
  
  <pre><code>~$ virtualenv ved -p /usr/bin/python2.7-dbg
  </code></pre>
  
  <p>Its all working fine, but when I'm using gdb inside the virtualenv, atleast the python pretty printers stop working:</p>
  
  <pre><code>~$ . ved/bin/activate
  (ved)~$ gdb python
  GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
  ---x snipped x---
  Reading symbols from /home/itai/ved/bin/python...done.
  (gdb) r
  Starting program: /home/itai/ved/bin/python
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
  Python 2.7.3 (default, Feb 27 2014, 19:39:25)
  [GCC 4.6.3] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt;
  Program received signal SIGINT, Interrupt.
  0x00007ffff6997743 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:82
  82      ../sysdeps/unix/syscall-template.S: No such file or directory.
  (gdb) py-bt
  Undefined command: "py-bt".  Try "help". (&lt;---- PROBLEM)
  (gdb)
  </code></pre>
  
  <p>Am I missing something within my virtualenv?</p>