This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ob] unbreak MI
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 27 Nov 2007 16:07:41 +1300
- Subject: Re: [ob] unbreak MI
- References: <200708312244.58216.ghost@cs.msu.su>
> 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