diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2011-04-29 12:45:46 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2011-04-29 12:45:46 +0000 |
commit | d65aec65d9e22f5232e414a4d8abef8f1279b090 (patch) | |
tree | d63d1f287b66a4d4591ca1010fa34023de1cbc42 /gdb/varobj.c | |
parent | b15d6aa360e54b5b921960261a015466f18bcb3c (diff) | |
download | ppe42-binutils-d65aec65d9e22f5232e414a4d8abef8f1279b090.tar.gz ppe42-binutils-d65aec65d9e22f5232e414a4d8abef8f1279b090.zip |
2011-04-29 Phil Muldoon <pmuldoon@redhat.com>
PR mi/12531
* varobj.c (install_default_visualizer): Do not install a
visualizer if the varobj is CPLUS_FAKE_CHILD.
(construct_visualizer): Likewise.
2011-04-29 Phil Muldoon <pmuldoon@redhat.com>
PR mi/12531
* gdb.python/py-mi.exp: Add CPLUS_FAKE_CHILD tests and a C++
compile target.
* gdb.python/py-prettyprint.exp: Add C++ object for
CPLUS_FAKE_CHILD test.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index bfb3851d75..e068823d55 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1397,6 +1397,10 @@ install_visualizer (struct varobj *var, PyObject *constructor, static void install_default_visualizer (struct varobj *var) { + /* Do not install a visualizer on a CPLUS_FAKE_CHILD. */ + if (CPLUS_FAKE_CHILD (var)) + return; + if (pretty_printing) { PyObject *pretty_printer = NULL; @@ -1429,6 +1433,10 @@ construct_visualizer (struct varobj *var, PyObject *constructor) { PyObject *pretty_printer; + /* Do not install a visualizer on a CPLUS_FAKE_CHILD. */ + if (CPLUS_FAKE_CHILD (var)) + return; + Py_INCREF (constructor); if (constructor == Py_None) pretty_printer = NULL; |