gdb-dashboard icon indicating copy to clipboard operation
gdb-dashboard copied to clipboard

different color for recently updated watch expressions?

Open AndrewJDR opened this issue 9 years ago • 4 comments

Would it be possible to change the color of watch expression lines that have changed since the last update?

AndrewJDR avatar Feb 05 '16 04:02 AndrewJDR

(Obviously the color would change back, such that only variables changed since the last update are differently colored)

AndrewJDR avatar Feb 05 '16 04:02 AndrewJDR

That would be a cool feature, but unlike the registers expressions (but also arguments, locals and values from the history) may evaluate to complex values like arrays and structs. The question is, assuming to have these changes:

{[0] = 0x7fffffffeba7 "1", [1] = 0x7fffffffeba9 "2", [2] = 0x7fffffffebab "3"}
{[0] = 0x7fffffffeba7 "1", [1] = 0x601030 "2", [2] = 0x7fffffffebab "3"}
{[0] = 0x7fffffffeba7 "1", [1] = 0x0, [2] = 0x7fffffffebab "3"}

what should be highlighted, the whole line or the single item? The former is easier to implement but also less effective, whereas the latter would be great but it would likely require a deeper knowledge of what a value is, i.e., not just a string.

As a side note, the more work is performed within a module the more the more evident will be the blanking effect you noticed in #25.

Let me see if I can come up with a reasonable solution...

cyrus-and avatar Feb 05 '16 14:02 cyrus-and

To be entirely honest, I hadn't thought of that because I don't tend to use watch expressions on arrays or structs. So, for me the tldr response is "The whole line" :)

The longer version: I think that being able to watch arrays and structs is very useful, but I also feel it's one of the main areas where the terminal fundamentally falls short of a proper GUI -- there's just not enough space/resolution to properly deal with anything more than a fairly trivial structure/array there. It's also nice to have the ability to selectively expand certain nested members, etc, and that is again not very practical without a proper GUI. This is in fact one of the few things I sorely miss in gdb-dashboard as compared to a "full" gui debugger like msvc or qtcreator.

That said, I'm sure yourself and others may find it useful to watch some smaller structs/arrays in gdb-dashboard and would appreciate individual member highlighting.

AndrewJDR avatar Feb 05 '16 14:02 AndrewJDR

This is in fact one of the few things I sorely miss in gdb-dashboard as compared to a "full" gui debugger like msvc or qtcreator.

Yup, you're right! On the other hand GDB dashboard is doubly disadvantaged if compared to standalone solutions, not only it offers a terminal-based interface, it is doomed to live between two consecutive GDB prompts. :)

cyrus-and avatar Feb 05 '16 15:02 cyrus-and