Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com
Subject: [ob] unbreak MI
Date: Fri, 31 Aug 2007 18:45:00 -0000	[thread overview]
Message-ID: <200708312244.58216.ghost@cs.msu.su> (raw)

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]


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


[-- Attachment #2: unbreak_mi.diff --]
[-- Type: text/x-diff, Size: 1584 bytes --]

? 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  <vladimir@codesourcery.com>
+
+	* mi/mi-cmd-var.c (print_varobj): If a varobj
+	type is NULL, don't try to print it.
+	
 2007-08-30  Alan Modra  <amodra@bigpond.net.au>
 
 	* 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);

             reply	other threads:[~2007-08-31 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 18:45 Vladimir Prus [this message]
2007-11-27  3:08 ` Nick Roberts
2007-11-27  6:17   ` Vladimir Prus
2007-11-27  6:28     ` Nick Roberts
2007-11-27  7:00       ` Vladimir Prus
2007-11-27 10:33         ` Nick Roberts
2007-11-27 10:45           ` Vladimir Prus
2007-11-27 11:08             ` Nick Roberts
2007-11-27 20:47         ` Michael Snyder
2007-11-27 21:05           ` Vladimir Prus
2007-11-27 23:13           ` Nick Roberts
2007-11-27 13:44   ` Daniel Jacobowitz
2007-11-27 23:11     ` Nick Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200708312244.58216.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox