This is the mail archive of the gdb@sources.redhat.com 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]

Re: RFC: gdbglobals.[ch]


>>>>> "Fernando" == Fernando Nasser <fnasser@cygnus.com> writes:
Fernando> I guess you are all aware of the problem we currently have
Fernando> with variables being needed somewhere else and then becoming
Fernando> globals (or spinning off global accessor functions).
Fernando>
Fernando> This is hitting the user interfaces as they have facilities
Fernando> to set/show some of these variables (see, for instance, the
Fernando> inferior_args case).
Fernando>
Fernando> As per Andrew's request, I have wrote down a proposal based
Fernando> on a private conversation we had so that we can see what
Fernando> people think about it.

Some things that are currently set/show variables would be convient to
access from GDB scripts.  It appears that this proposal would compound
that mistake by having yet another set of variables that cannot be
accessed by GDB's scripting language.

Why not make these regular GDB $ variables?  Then alternate scripting
languages and user interfaces would only need one mechanism to access
GDB variables instead of the two (or three, if this proposal is
adopted) used today.  

One problem would be ensuring a clean namespace so that user's scripts
wouldn't break when new variables are exported from GDB.  I think this
is solvable, and would result in a more coherent GDB/scripting language/
UI layering.

        --jtc

-- 
J.T. Conklin
RedBack Networks

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