]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/doc/python.texi
Allow setting a parameter to raise gdb.GdbError
authorTom Tromey <tom@tromey.com>
Sat, 15 Sep 2018 07:09:22 +0000 (01:09 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 24 Sep 2018 05:15:12 +0000 (23:15 -0600)
commitae778caf097e08497f2e9218cf68b254b8da38f1
tree4d9491413ed523cd72c541def36f1bafba954dca
parent2b4ad2fe4300489fd40dbe07e1675ff1cf0bee58
Allow setting a parameter to raise gdb.GdbError

A convention in the Python layer is that raising a gdb.GdbError will
not print the Python stack -- instead the exception is treated as any
other gdb exception.

PR python/18852 asks that this treatment be extended the the
get_set_value method of gdb.Parameter.  This makes sense, because it
lets Python-created parameters act like gdb parameters.

2018-09-23  Tom Tromey  <tom@tromey.com>

PR python/18852:
* python/py-param.c (get_set_value): Use gdbpy_handle_exception.

gdb/doc/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

PR python/18852:
* python.texi (Parameters In Python): Document exception behavior
of get_set_string.

gdb/testsuite/ChangeLog
2018-09-23  Tom Tromey  <tom@tromey.com>

PR python/18852:
* gdb.python/py-parameter.exp: Add test for parameter that throws
on "set".
gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/python.texi
gdb/python/py-param.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-parameter.exp