This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] [libstdc++ pretty-printer] Fix hook.in for x86_64


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):]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]