Skip to content
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
@ghost

Description

When debugging with gdb, it's not clear how to call functions of gtk objects.

Take this for example

label.set_text(&time);

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions