This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: GDB 8.0 release/branching 2017-03-20 update
"Metzger, Markus T" <markus.t.metzger@intel.com> writes:
>> struct PyGetSetDef py_insn_getset[] =
>> {
>> { "data", py_insn_data, NULL, "raw instruction data", NULL},
>> { "decoded", py_insn_decode, NULL, "decoded instruction", NULL},
>> { "size", py_insn_size, NULL, "instruction size in byte", NULL},
>> { "pc", py_insn_pc, NULL, "instruction address", NULL },
>> {NULL}
>> };
>
> This is for the (abstract) base-class, I assume.
>
Yes, it is the base class, but it is the implementation detail about the
class is abstract or not. I haven't think about it yet. Again, I only
care about python interface at this stage.
> We don't store any data in the base class so the Python object would
> contain the PyObject header and nothing else, correct?
>
> And the above functions would throw an exception or return None.
> Correct?
>
I didn't go that far yet :)
>
>> struct PyGetSetDef btpy_insn_getset[] =
>> {
>> { "data", btpy_insn_data, NULL, "raw instruction data", NULL},
>> { "decoded", btpy_insn_decode, NULL, "decoded instruction", NULL},
>> { "size", btpy_insn_size, NULL, "instruction size in byte", NULL},
>> { "pc", btpy_insn_pc, NULL, "instruction address", NULL },
>>
>> { "number", btpy_number, NULL, "instruction number", NULL},
>> { "sal", btpy_sal, NULL, "instruction number", NULL},
>> {NULL}
>> };
>
> This is for the BtraceInstruction derived class, I assume. That's essentially
> what Tim implemented. Correct?
>
> This doesn't look too far away from what we have in GDB today.
I requested to change the python interface in Tim's patch, not the
implementation.
--
Yao (齐尧)