GDB 8.0 release/branching 2017-03-20 update

Yao Qi qiyaoltc@gmail.com
Tue Mar 28 13:25:00 GMT 2017


"Metzger, Markus T" <markus.t.metzger@intel.com> writes:

> That sounds good.  We want to provide a fixed set of functions and we want
> to be free to choose the best internal representation for each variant.
>

Exactly.

> How would this look in our python implementation?

I am not sure.  One approach in my mind is that sub-class can overwrite
by defining its own getset.

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}
};

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}
};

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list