Message176674
| Author |
dmalcolm |
| Recipients |
dmalcolm, ezio.melotti, ncoghlan, python-dev, r.david.murray, skrah |
| Date |
2012年11月29日.21:40:39 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1354225240.11.0.71950857589.issue15043@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
In my Fedora Python packages I've been applying this patch:
http://pkgs.fedoraproject.org/cgit/python.git/plain/00156-gdb-autoload-safepath.patch
which uses this code fragment to detect if gdb has the autoload safe path code, rather than trying to guess it from version numbers (which I *think* is failing for Stefan due to a backport of the autoload stuff in that gdb):
def gdb_has_autoload_safepath():
# Recent GDBs will only auto-load scripts from certain safe
# locations, so we will need to turn off this protection.
# However, if the GDB doesn't have it, then the following
# command will generate noise on stderr (rhbz#817072):
cmd = "--eval-command=set auto-load safe-path /"
p = subprocess.Popen(["gdb", "--batch", cmd],
stderr=subprocess.PIPE)
_, stderr = p.communicate()
return '"on" or "off" expected.' not in stderr
HAS_AUTOLOAD_SAFEPATH = gdb_has_autoload_safepath()
(etc) |
|