Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] Refreshing the Variables view when changing memory via the Memory view

I've been trying to get our CDI client (non-gdb) to get the Variables view to update after a change to memory via the Memory View, and I've been trying to do this without changes to CDT code--strictly by adding logic to or CDI backend. What I've got so far works fine for simple scenarios: primitives on the stack, and even arrays. But it falls short when you're dealing with nested objects (pointers to struct/class). That is, if the user modified the memory at 0x1000, and that ends up being associated with field a->b->c->d in the Variables view, how can I get that element in the view to refresh/update? I've come to the conclusion that it's just not possible, or practical (even if it was possible).

A brute-force way to guarantee the Variables and Memory view stay in synch is to get CDT to invalidate all variables of all frames of all threads when memory in the Target is modified via a CDT MemoryBlock. This behavior could be applied only to backends that want it. This seems extremely inefficient, but trying to sharp-shoot the elements that changed is very costly as well, assuming it's even possible. And it seems to me leaving the two views out of synch is not acceptable.

I'm wondering what folks out there are doing about this situation in their products now, and I welcome feedback on my proposal.

Joh



Back to the top