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] |
Hi Yao, > The change looks reasonable to me. Do we need to update test case? > In py-inferior.exp, we have (...) Thanks for the pointer. I've attached a revised version of the patch. Tim > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] On Behalf Of Yao Qi > Sent: Friday, March 3, 2017 11:22 AM > To: Wiederhake, Tim <tim.wiederhake@intel.com> > Cc: Jose E. Marchesi <jose.marchesi@oracle.com>; gdb- > patches@sourceware.org > Subject: 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 (齐尧) 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
Attachment:
v2-0001-Fix-break-on-Python-2.patch
Description: v2-0001-Fix-break-on-Python-2.patch
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |