GNOME Bugzilla – Bug 436374
Error output when debugging gtkmm example
Last modified: 2008-02-03 11:14:14 UTC
When debugging the gtkmm custom_widget example (in the gtkmm tarball), I get the following output: jonathon@wombat [ ~/.svn/gnome2/gtkmm ] tty0 [0] $ nemiver ./examples/book/custom/custom_widget/.libs/lt-example |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1320:hit end index 149 |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1338:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 116 |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1338:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 98 |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1338:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 81 |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1338:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 64 |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1338:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 44 |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1338:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 30 |E|bool nemiver::parse_variable_value(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&):nmv-gdbmi-parser.cc:1226:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 13 |E|bool nemiver::parse_result_record(const nemiver::common::UString&, size_t, size_t&, nemiver::Output::ResultRecord&):nmv-gdbmi-parser.cc:2489:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>" (gdb) <<< cur index was: 6
hello, It would be really helpful to attach the output of nmv_log_domains="gdbmi-output-domain nmv-gdb-engine.cc" nemiver > out.log so that we have more information. My feeling is that the gdbmi parser is being fed with a partial gdbmi input. So the nemiver/gdb communication controler may be cutting some messages it receives from gdb. I am not sure about that though. More logs should greatly help here. Thank in advance, Dodji.
Created attachment 87764 [details] output from nmv_log_domains="gdbmi-output-domain nmv-gdb-engine.cc" nemiver .libs/example > out.log
hmmh, Okay. Trying to reproduce that bug myself, I got a smiliar output that I have pasted below. I will try and work on this. |E|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1459:parsing failed for buf: >>>^done,value="{<Gtk::Window> = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<Glib::ObjectBase> = {<sigc::trackable> = {callback_list_ = 0xb73e1ff4}, _vptr.ObjectBase = 0xb73e1ff4, gobject_ = 0x8051643, custom_type_name_ = 0x8050ef0 \"U\\211\\345WVS\\350O\", cpp_destruction_in_progress_ = 200}, _vptr.Object = 0xb73e1ff4, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, referenced_ = 67, gobject_disposed_ = 22}, <Atk::Implementor> = {<Glib::Interface> = {_vptr.Interface = 0x8050ef0}, static implementor_class_ = {<Glib::Interface_Class> = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, <No data fields>}}, static widget_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static container_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static bin_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static window_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, accel_group_ = {pCppObject_ = 0xbfd83fc8}}, m_VBox = {<Gtk::Box> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<Glib::ObjectBase> = <invalid address>, _vptr.Object = 0xb7390906, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, referenced_ = 67, gobject_disposed_ = 22}, <Atk::Implementor> = {<Glib::Interface> = {_vptr.Interface = 0x805164b}, static implementor_class_ = {<Glib::Interface_Class> = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, <No data fields>}}, static widget_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static container_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static box_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, children_proxy_ = {<Glib::HelperList<Gtk::Box_Helpers::Child,const Gtk::Box_Helpers::Element,Glib::List_Iterator<Gtk::Box_Helpers::Child> >> = {_vptr.HelperList = 0xbfd83fff, gparent_ = 0xb73e1f00}, <No data fields>}}, static vbox_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, m_MyWidget = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<Glib::ObjectBase> = <invalid address>, _vptr.Object = 0xb71aaf55, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, referenced_ = 172, gobject_disposed_ = 54}, <Atk::Implementor> = {<Glib::Interface> = {_vptr.Interface = 0x8056200}, static implementor_class_ = {<Glib::Interface_Class> = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, <No data fields>}}, static widget_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, m_refGdkWindow = {pCppObject_ = 0xb7b3ed64}, m_scale = -1209413632}, m_ButtonBox = {<Gtk::ButtonBox> = {<Gtk::Box> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<Glib::ObjectBase> = <invalid address>, _vptr.Object = 0xb71ab0d0, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static object_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, referenced_ = 20, gobject_disposed_ = 65}, <Atk::Implementor> = {<Glib::Interface> = {_vptr.Interface = 0xb7fdace0}, static implementor_class_ = {<Glib::Interface_Class> = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, <No data fields>}}, static widget_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static container_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static box_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}, children_proxy_ = {<Glib::HelperList<Gtk::Box_Helpers::Child,const Gtk::Box_Helpers::Element,Glib::List_Iterator<Gtk::Box_Helpers::Child> >> = {_vptr.HelperList = 0xbfd84028, gparent_ = 0x804da59}, <No data fields>}}, static buttonbox_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, static hbuttonbox_class_ = {<Glib::Class> = {gtype_ = 0, class_init_func_ = 0}, <No data fields>}}, m_Button_Quit = {<Gtk::Bin> = {<Gtk::Container> = {<Gtk::Widget> = {<Gtk::Object> = {<Glib::Object> = {<error reading variable>}" (gdb) <<< cur index was: 4689 |X|bool nemiver::parse_member_variable(const nemiver::common::UString&, size_t, size_t&, nemiver::common::SafePtr<nemiver::IDebugger::Variable, nemiver::common::ObjectRef, nemiver::common::ObjectUnref>&, bool):nmv-gdbmi-parser.cc:1460:raised exception: should not be reached |E|bool nemiver::GDBEngine::Priv::on_gdb_stdout_has_data_signal(Glib::IOCondition):nmv-gdb-engine.cc:720:should not be reached
It seems gdb is returning a truncacted content. That behaviour can be reproduced with a bare gdb: gdb --interpreter=mi2 .libs/example b main run -data-evaluate-expression window You can see that the content of the variable "window" returned by gdb is truncated. So I must make the parser understand that broken output, and try to debug that at the gdb level one day. /me sighs.
.... oh my ... that sucks. Does it behave the same with the non-mi interface?
The non mi interface does not send the information the same hierarchical format, and thus does not exhibit the same flaw.
I have pushed changeset r723 to svn trunk. That changeset should hopefully fix the problem.