Subject: Re: bug#63084: 30.0.50; gud: set breakpoint while program is running

From: TatriX <[email-masked]>
Date: Sun, 28 May 2023 23:10:21 +0200

Nice! Thank you!

I tend to use `M-x gdb` with `gdb-many-windows` disabled but easily
reachable via a custom keybinding that toggles it.

One feature I'm really missing is a variable watcher.

There's a locals view which is useful sometimes, but gets messy when
there are handfull of variables in scope.  Then there's a speedbar,
but as far as I can tell it's impossible to make it into a regular
window, which means it and cannot participate in my regular emacs
window workflow, which is sub-optimal. But the biggest issue with it
is that it forgets what was added to it on every program restart,
making it pretty much unusable for my needs.

I've played a bit with gdb-mi and managed to make something that
somewhat works. Please check a screenshot in the attachment.

I can add variables to watch via the minibuffer. They get updated in
the *gdb-watch* window through `-data-evaluate-expression` in the
`gdb-stopped-functions` hook.

I've also started looking at "GDB/MI Variable Objects"(1) which looks
like a proper way to add that functionality. But it requires a bit
more work.

How do you feel about having something similar in gdb-mi?

1: https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects