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] |
So you only really need to preserve convenience variables whose types
are builtin types, and don't go away when symbol tables are reloaded. Wouldn't it be simpler just to have clear_internalvars only clear
variables whose types belong to objfiles?
I think you've switched patches - this is about updating variables on an endianness switch, not clearing them when we reload. I think that one way or another, we ought to preserve the values or discard the convenience variables; leaving them corrupted fails my "can I explain this behavior to a user" test.
Or you could define a hook that runs a user-defined command when the architecture changes. Then your script could define a command that sets up your variables, and have GDB run that command when the architecture is known. We'd have to think about the best time to run the hook, but I'm sure something reasonable could be worked out.
Just seems nasty. Why not preserve things that we know how to preserve, and clear anything we don't? We know how to preserve scalars by reading them into a LONGEST, and floats by reading them into a DOUBLEST. Structures require complicated recursion and unions are intractable.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |