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: [RFC] Debug Operators with GDB Python


>>>>> "Siva" == Siva Chandra <sivachandra@google.com> writes:

Siva> Since we have to cater for template types, the user will have to
Siva> provide a type name matcher rather than specify the type name
Siva> explicitly. Then, adding a method would require that we go over
Siva> all the types in the user's program to find the right type to add
Siva> to.

Ok, I see.

It still seems a shame since I think this is functionality we're going
to want someday anyway.  "print vec.size()" is a frequent user problem,
we ought to solve it somehow.

But given the design (cough cough) of the symbol table and other
factors, it does seem difficult.

I suppose in a way there are two different problems here.  One is
substituting a gdb-side Python function for some request to an inferior
function call.  This one seems relatively doable in full generality.
The other problem is adding new global functions or methods.  This seems
harder.

Siva> I would like to implement operators first, and implement
Siva> methods (or as Doug suggests, extend it to any function) as the next
Siva> step. We might, during the implementation of the methods feature, move
Siva> things we added for the operators feature to a common place. Does it
Siva> sound like an acceptable plan?

I think it seems weird if you are actually planning to do the next step.
Why mess around with something you'll probably end up deprecating in
favor of the more general solution?

Tom


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