From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15202 invoked by alias); 31 Aug 2007 18:45:10 -0000 Received: (qmail 15192 invoked by uid 22791); 31 Aug 2007 18:45:09 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 31 Aug 2007 18:45:04 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1IRBUK-0001jw-KB for gdb-patches@sources.redhat.com; Fri, 31 Aug 2007 22:45:01 +0400 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1IRBUK-0001jr-EN for gdb-patches@sources.redhat.com; Fri, 31 Aug 2007 22:45:00 +0400 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: [ob] unbreak MI Date: Fri, 31 Aug 2007 18:45:00 -0000 User-Agent: KMail/1.9.6 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_qGG2GoCa4iYQ1MH" Message-Id: <200708312244.58216.ghost@cs.msu.su> 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-08/txt/msg00558.txt.bz2 --Boundary-00=_qGG2GoCa4iYQ1MH Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 317 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. - Volodya --Boundary-00=_qGG2GoCa4iYQ1MH Content-Type: text/x-diff; charset="utf-8"; name="unbreak_mi.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="unbreak_mi.diff" Content-length: 1584 ? 1.diff ? 2.diff ? 3.diff ? unbreak_mi.diff Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.8659 diff -u -p -r1.8659 ChangeLog --- ChangeLog 30 Aug 2007 13:13:58 -0000 1.8659 +++ ChangeLog 31 Aug 2007 18:41:20 -0000 @@ -1,3 +1,8 @@ +2007-08-31 Vladimir Prus + + * mi/mi-cmd-var.c (print_varobj): If a varobj + type is NULL, don't try to print it. + 2007-08-30 Alan Modra * ppc-linux-nat.c (right_fill_reg): Delete. Index: mi/mi-cmd-var.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmd-var.c,v retrieving revision 1.38 diff -u -p -r1.38 mi-cmd-var.c --- mi/mi-cmd-var.c 28 Aug 2007 20:34:18 -0000 1.38 +++ mi/mi-cmd-var.c 31 Aug 2007 18:41:20 -0000 @@ -47,6 +47,7 @@ static void print_varobj (struct varobj *var, enum print_values print_values, int print_expression) { + struct type *gdb_type; char *type; ui_out_field_string (uiout, "name", varobj_get_objname (var)); @@ -54,7 +55,8 @@ print_varobj (struct varobj *var, enum p ui_out_field_string (uiout, "exp", varobj_get_expression (var)); ui_out_field_int (uiout, "numchild", varobj_get_num_children (var)); - 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)); type = varobj_get_type (var); --Boundary-00=_qGG2GoCa4iYQ1MH--