This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] keep-variable command


Daniel Jacobowitz wrote:
For one thing, why is this a command at all?  If we support keeping
convenience variables across symbol file reloads, then why not do it by
default for all convenience variables?  I doubt having them disappear
has ever been considered a feature.

If it doesn't find a type for the variable it gives a message and sets the value to void. This would be irritating with a large number of variables you no longer care about. Otherwise I would agree with you.


Perhaps instead of the message the value could somehow be shown as '<type lost>', in which case it wouldn't matter so much. I was considering the possibility of keeping the value around on the off chance the type has come back the next time the variable is accessed.

Alternatively, we could add code to duplicate the types recursively
onto a convenience variable obstack.  GDB doesn't have much of a notion
of "type compatibility".  It might not work 100% right for things like
C++ operator overloading, but for that we'd need to do type merging
anyway.

I have no idea what you just said, but if it avoids type fixup problems then that would be a good thing all round. Is it worth whatever effort it would take though? Is it instead of textual type remembering or instead of replacing the type at all?


Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]