After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 436374 - Error output when debugging gtkmm example
Error output when debugging gtkmm example
Status: RESOLVED FIXED
Product: nemiver
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Dodji Seketeli
Nemiver maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-06 15:33 UTC by Jonathon Jongsma
Modified: 2008-02-03 11:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
output from nmv_log_domains="gdbmi-output-domain nmv-gdb-engine.cc" nemiver .libs/example > out.log (116.80 KB, text/plain)
2007-05-08 00:50 UTC, Jonathon Jongsma
Details

Description Jonathon Jongsma 2007-05-06 15:33:13 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
Comment 1 Dodji Seketeli 2007-05-07 14:01:42 UTC
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.
Comment 2 Jonathon Jongsma 2007-05-08 00:50:55 UTC
Created attachment 87764 [details]
output from nmv_log_domains="gdbmi-output-domain nmv-gdb-engine.cc" nemiver .libs/example > out.log
Comment 3 Dodji Seketeli 2008-01-25 17:36:01 UTC
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

Comment 4 Dodji Seketeli 2008-01-25 18:01:49 UTC
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.

Comment 5 Jonathon Jongsma 2008-01-25 18:46:43 UTC
.... oh my ...
that sucks. Does it behave the same with the non-mi interface?
Comment 6 Dodji Seketeli 2008-02-03 11:12:34 UTC
The non mi interface does not send the information the same hierarchical format, and thus does not exhibit the same flaw.
Comment 7 Dodji Seketeli 2008-02-03 11:14:14 UTC
I have pushed changeset r723 to svn trunk. That changeset should hopefully fix the problem.