This repository was archived by the owner on Mar 4, 2024. It is now read-only.
This repository was archived by the owner on Mar 4, 2024. It is now read-only.
[HELP] How does one debug with gdb? #544
Closed

Description
When debugging with gdb
, it's not clear how to call functions of gtk objects.
Take this for example
gtk3-rs/examples/clock/main.rs
Line 19 in 8b57ba7
Adding the line println!("Time from label: {}", label.text().as_str());
below it works. However a breakpoint there with gdb
fails to yield a string in the console
(gdb) print label.text().as_str()
Could not find function named 'gtk::auto::label::Label::text'
(gdb) print gtk::auto::label::LabelExt::text(label)
No symbol 'gtk::auto::label::LabelExt::text' in current context
Looking at label
itself doesn't help either as I don't know how to call the functions I want from inner
or pointer
(gdb) print label
$1 = gtk::auto::label::Label (glib::object::ObjectRef {inner: core::ptr::non_null::NonNull<gobject_sys::GObject> {pointer: 0x55555584f7f0}})
How do I use gdb
with gtk-rs
?
Metadata
Metadata
Assignees
Labels
No labels