[python][patch] Add options length parameter to value.string(...)
Phil Muldoon
pmuldoon@redhat.com
Mon Apr 6 16:54:00 GMT 2009
This patch adds an optional length parameter to the value.string()
method. This allows partial string fetches, and string fetches that
ignore embedded null characters in the C/C++ string case. If the length
parameter is omitted, the method will maintain the existing behaviour of
fetching a string until a terminating null in the C/C++ case.
Regards
Phil
ChangeLog
2009-04-06 Phil Muldoon <pmuldoon@redhat.com>
* python/python-value.c (valpy_string): Parse length keyword. Use
length keyword in LA_GET_STRING.
* c-lang.c (c_get_string): If the length parameter is specified,
use that.
testsuite/ChangeLog
2009-04-06 Phil Muldoon <pmuldoon@redhat.com>
* gdb.python/python-value.exp (test_value_in_inferior): Add
variable length string fetch tests.
* gdb.python/python-value.c (main): Add strings for string fetch tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valpy_variable_string_fetch.patch
Type: text/x-patch
Size: 4957 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/archer/attachments/20090406/3b35acb0/attachment.bin>
More information about the Archer
mailing list