Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different color for recently updated watch expressions? #24

Open
AndrewJDR opened this issue Feb 5, 2016 · 4 comments
Open

different color for recently updated watch expressions? #24

AndrewJDR opened this issue Feb 5, 2016 · 4 comments

Comments

@AndrewJDR
Copy link

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

@AndrewJDR
Copy link
Author

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

@cyrus-and
Copy link
Owner

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...

@AndrewJDR
Copy link
Author

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.

@cyrus-and
Copy link
Owner

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants