+2015-11-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ PR libstdc++/68448
+ * python/hook.in: Call register_libstdcxx_printers.
+ * python/libstdcxx/v6/__init__.py: Wrap it to
+ register_libstdcxx_printers.
+
2015-11-17 Jonathan Wakely <jwakely@redhat.com>
- PR libstdc++66059
+ PR libstdc++/66059
* include/std/utility (_Build_index_tuple): Optimise.
2015-11-16 Doug Evans <dje@google.com>
if not dir_ in sys.path:
sys.path.insert(0, dir_)
-import libstdcxx.v6
+# Call a function as a plain import would not execute body of the included file
+# on repeated reloads of this object file.
+from libstdcxx.v6 import register_libstdcxx_printers
+register_libstdcxx_printers(gdb.current_objfile())
import gdb
-# Load the pretty-printers.
-from .printers import register_libstdcxx_printers
-register_libstdcxx_printers(gdb.current_objfile())
-
# Load the xmethods if GDB supports them.
def gdb_has_xmethods():
try:
except ImportError:
return False
-if gdb_has_xmethods():
- from .xmethods import register_libstdcxx_xmethods
- register_libstdcxx_xmethods(gdb.current_objfile())
+def register_libstdcxx_printers(obj):
+ # Load the pretty-printers.
+ from .printers import register_libstdcxx_printers
+ register_libstdcxx_printers(obj)
+
+ if gdb_has_xmethods():
+ from .xmethods import register_libstdcxx_xmethods
+ register_libstdcxx_xmethods(obj)