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: MemoryView missing from Python 2.4 and 2.6


"Wiederhake, Tim" <tim.wiederhake@intel.com> writes:

> This changes the return type of "gdb.BtraceInstruction.data ()" from
> "memoryview" to "buffer" on Python 2.7 and below, similar to what
> "gdb.Inferior.read_memory ()" does.

The change looks reasonable to me.  Do we need to update test case?
In py-inferior.exp, we have

gdb_py_test_silent_cmd "python str = gdb.inferiors()\[0\].read_memory (addr, 5); print(str)" \
  "read str contents" 1
if { $gdb_py_is_py3k == 0 } {
  gdb_py_test_silent_cmd "python a = 'a'" "" 0
} else {
  gdb_py_test_silent_cmd "python a = bytes('a', 'ascii')" "" 0
}

I assume we need something similar here.

-- 
Yao (齐尧)


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