Commit cdccafd9 by Jan Kratochvil

re PR libstdc++/68448 (Python Pretty Printers get disabled on libstdc++ reload by GDB)

	PR libstdc++/68448
	* python/hook.in: Call register_libstdcxx_printers.
	* python/libstdcxx/v6/__init__.py: Wrap it to
	register_libstdcxx_printers.

From-SVN: r230669
parent eed905e9
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> 2015-11-17 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++66059 PR libstdc++/66059
* include/std/utility (_Build_index_tuple): Optimise. * include/std/utility (_Build_index_tuple): Optimise.
2015-11-16 Doug Evans <dje@google.com> 2015-11-16 Doug Evans <dje@google.com>
......
...@@ -55,4 +55,7 @@ if gdb.current_objfile () is not None: ...@@ -55,4 +55,7 @@ if gdb.current_objfile () is not None:
if not dir_ in sys.path: if not dir_ in sys.path:
sys.path.insert(0, dir_) 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())
...@@ -15,10 +15,6 @@ ...@@ -15,10 +15,6 @@
import gdb 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. # Load the xmethods if GDB supports them.
def gdb_has_xmethods(): def gdb_has_xmethods():
try: try:
...@@ -27,6 +23,11 @@ def gdb_has_xmethods(): ...@@ -27,6 +23,11 @@ def gdb_has_xmethods():
except ImportError: except ImportError:
return False return False
if gdb_has_xmethods(): def register_libstdcxx_printers(obj):
from .xmethods import register_libstdcxx_xmethods # Load the pretty-printers.
register_libstdcxx_xmethods(gdb.current_objfile()) from .printers import register_libstdcxx_printers
register_libstdcxx_printers(obj)
if gdb_has_xmethods():
from .xmethods import register_libstdcxx_xmethods
register_libstdcxx_xmethods(obj)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment