aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2019-02-16 17:46:33 -0700
committerKevin Buettner <kevinb@redhat.com>2019-02-26 10:23:23 -0700
commitfe07eca59d0544eb6c56c3559da9ceece23cae6e (patch)
treea5330ff950e45356c2a64e43cb521ec67649c79f /gdb/NEWS
parent26c897821b37af894088ec5731f93dc82e79b6d4 (diff)
downloadfsf-binutils-gdb-fe07eca59d0544eb6c56c3559da9ceece23cae6e.zip
fsf-binutils-gdb-fe07eca59d0544eb6c56c3559da9ceece23cae6e.tar.gz
fsf-binutils-gdb-fe07eca59d0544eb6c56c3559da9ceece23cae6e.tar.bz2
Define gdb.Value(bufobj, type) constructor
Provided a buffer BUFOBJ and a type TYPE, construct a gdb.Value object with type TYPE, where the value's contents are taken from BUFOBJ. E.g... (gdb) python import struct (gdb) python unsigned_int_type=gdb.lookup_type('unsigned int') (gdb) python b=struct.pack('=I',0xdeadbeef) (gdb) python v=gdb.Value(b, unsigned_int_type) ; print("%#x" % v) 0xdeadbeef This two argument form of the gdb.Value constructor may also be used to obtain gdb values from selected portions of buffers read with Inferior.read_memory(). The test case (which is in a separate patch) demonstrates this use case. gdb/ChangeLog: * python/py-value.c (convert_buffer_and_type_to_value): New function. (valpy_new): Parse arguments via gdb_PyArg_ParseTupleAndKeywords. Add support for handling an optional second argument. Call convert_buffer_and_type_to_value as appropriate.
Diffstat (limited to 'gdb/NEWS')
0 files changed, 0 insertions, 0 deletions