From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3609 invoked by alias); 27 Nov 2007 03:08:14 -0000 Received: (qmail 3601 invoked by uid 22791); 27 Nov 2007 03:08:13 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Nov 2007 03:08:02 +0000 Received: from kahikatea.snap.net.nz (183.63.255.123.dynamic.snap.net.nz [123.255.63.183]) by viper.snap.net.nz (Postfix) with ESMTP id 02EE73D9EE0; Tue, 27 Nov 2007 16:07:55 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id EB0748FC6D; Tue, 27 Nov 2007 16:07:42 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18251.35325.929245.184830@kahikatea.snap.net.nz> Date: Tue, 27 Nov 2007 03:08:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [ob] unbreak MI In-Reply-To: <200708312244.58216.ghost@cs.msu.su> References: <200708312244.58216.ghost@cs.msu.su> X-Mailer: VM 7.19 under Emacs 23.0.50.3 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00501.txt.bz2 > It appears that some of recent cleanups broke MI, because > check_typedef is getting passed a NULL pointer -- this > suggest someone did not run a testsuite prior to commit ;-). > > It does not matter which particular patch broke it, because > it's trivially fixable by the attached patch, checked in > as obvious. This fix (now in GDB 6.7) breaks watch expressions of C++ objects on Emacs because the MI command "-var-list-children --all-values" no longer always includes the value field: - if (mi_print_value_p (varobj_get_gdb_type (var), print_values)) + gdb_type = varobj_get_gdb_type (var); + if (gdb_type && mi_print_value_p (gdb_type, print_values)) ui_out_field_string (uiout, "value", varobj_get_value (var)); Generally, with a NULL pointer, or and address that can't be dereferenced, MI prints out the value field as value="". What is the problem in this case? Why isn't the right fix to add a check_typedef somewhere? -- Nick http://www.inet.net.nz/~nickrob