Binary operations on struct/class values in GDB Python
Siva Chandra <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAGyQ6gyNz69k=wtRPsCODTSCGB4LamH_aeX1eXpfkfukUf_KOA@mail.gmail.com> |
Hi, Under the section "Python API => Values from Inferior" in the GDB manual, we have this: "Inferior values that are simple scalars can be used directly in Python expressions that are valid for the value's data type." Why are binary operations, which are syntactically correct in Python as well, restricted to only simple scalars (and pointers)? Couldn't the Python side call the overloaded operators for structs/classes if they exist? I am discounting the '[]' operator as that has a completely different meaning for gdb.Value objects. Thanks, Siva Chandra