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/Patch] Call overloaded operators to perform valid Python operations on struct/class values.


dje> smart_ptr = gdb.parse_and_eval ("my_smart_ptr");
dje> dereferenced_smart_ptr = gdb.parse_and_eval("*%V" % smart_ptr)

siva> Should work. May be the '%' syntax would not (I am not sure). But, we
siva> could consider other alternatives [Replace occurrences of $1, $2, etc
siva> for example].

siva> Is this an exhaustive solution or a cool fallback option when no other
siva> Pythonic way works

dje> Both?
dje> [Not sure I understand the question.]

I do think it is exhaustive. But, somehow [only a subjective feeling],
seems like a fallback option. For example, it makes simple things
(like, val1 + val2) more verbose and less readable. It is something
which one could fallback to if they want to do non-Python operations.


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