]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
gdb/doc: fix the example for get_set_string in Python API docs
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 18 Mar 2021 16:44:14 +0000 (16:44 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 18 Mar 2021 16:55:37 +0000 (16:55 +0000)
commit763b8efdcc0ab0f94f7af48792eb5c97b6eca41b
tree631b2bcb2bab98165d8824a971bb798c291a8a98
parent538c15fc2a29ff142f2ec71d253d4027946ece09
gdb/doc: fix the example for get_set_string in Python API docs

The small example for gdb.Parameter.get_set_string does not return a
string.  The documentation is very clear that this method must return
a string, and indeed, inspecting the code in gdb/python/py-param.c
shows that a string return value is required (if an exception is not
thrown).

While inspecting the code in gdb/python/py-param.c I noticed that the
comment for the C++ code that invokes the Python get_set_string method
is wrong, so I updated that too.

gdb/ChangeLog:

* python/py-param.c (get_set_value): Update header comment.

gdb/doc/ChangeLog:

* python.texinfo (Parameters In Python): Return empty string in
small example code.
gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/python.texi
gdb/python/py-param.c