RE: GDB 8.0 release/branching 2017-03-20 update

Metzger, Markus T
2017-03-29T06:08:31Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2337 bytes --]

Hello Yao,

> >> 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 :)

What else could the do? We agreed that the base class will be abstract and
let the derived classes chose the data members to best implement the functions.

> >> 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.

Now I'm a bit lost. What exactly do you want changed at this point to
establish the Python interface?

Thanks,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
\x16º&Öéj×!zÊÞ¶êç×~üç©b²Ö«r\x18\x1dn–­r\x17¬