[patch] [libstdc++ pretty-printer] Fix hook.in for x86_64
Jan Kratochvil
jan.kratochvil@redhat.com
Thu Sep 17 21:58:00 GMT 2009
Hi,
hook.in was failing:
pythondir is /usr/lib/python2.6/site-packages/gdb
libdir is /usr/lib64
prefix is /usr
dir is /lib/python2.6/site-packages/gdb
Traceback (most recent call last):
File "/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.12-gdb.py", line 59, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named libstdcxx.v6.printers
prefix got set to "/usr/lib" but the code expects a trailing "/" (missing then
one "../" path component).
I have no technical GCC SVN check-in rights.
Thanks,
Jan
2009-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* python/hook.in: Fix prefix trailing slash on 64bit host arches.
--- ./libstdc++-v3-python-r151798/hook.in-orig 2009-06-18 21:12:37.000000000 +0200
+++ ./libstdc++-v3-python-r151798/hook.in 2009-09-17 23:37:35.000000000 +0200
@@ -40,7 +40,7 @@ if gdb.current_objfile () is not None:
# In some bizarre configuration we might have found a match in the
# middle of a directory name.
if prefix[-1] != '/':
- prefix = os.path.dirname (prefix)
+ prefix = os.path.dirname (prefix) + '/'
# Strip off the prefix.
pythondir = pythondir[len (prefix):]
More information about the Archer
mailing list