This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 7/7] Allow setting a parameter to raise gdb.GdbError
On 2018-09-15 5:15 a.m., Eli Zaretskii wrote:
>> From: Tom Tromey <tom@tromey.com>
>> Cc: Tom Tromey <tom@tromey.com>
>> Date: Sat, 15 Sep 2018 01:24:59 -0600
>>
>> diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
>> index aca6ec858cf..0487a6f3bf3 100644
>> --- a/gdb/doc/python.texi
>> +++ b/gdb/doc/python.texi
>> @@ -3824,6 +3824,30 @@ example, @kbd{set foo off}). The @code{value} attribute has already
>> been populated with the new value and may be used in output. This
>> method must return a string. If the returned string is not empty,
>> @value{GDBN} will present it to the user.
>> +
>> +If this method raises @code{gdb.GdbError} (@pxref{Exception
>
> "raises the 'gdb.GdbError' exception", I presume?
I think that was intentional, I often see it written this way. Here's
an example from the Python doc:
https://docs.python.org/2/library/string.html#string.index
Everything in that series looks reasonable to me, thanks for doing this.
Have you tried to run your tests on Python 3 though? I get some failures
because long doesn't exist there.
Simon