From d65aec65d9e22f5232e414a4d8abef8f1279b090 Mon Sep 17 00:00:00 2001 From: Phil Muldoon Date: Fri, 29 Apr 2011 12:45:46 +0000 Subject: 2011-04-29 Phil Muldoon 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 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. --- gdb/varobj.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/varobj.c') 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; -- cgit v1.2.1