This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Add basic Python API for convenience variables


Hi Tom,

> This adds a basic Python API for accessing convenience variables.
> With this, convenience variables can be read and set from Python.
> Although gdb supports convenience variables whose value changes at
> each call, this is not exposed to Python; it could be, but I think
> it's just as good to write a convenience function in this situation.
> 
> This is PR python/23080.
> 
> Tested on x86-64 Fedora 26.
> 
> ChangeLog
> 2018-04-22  Tom Tromey  <tom@tromey.com>
> 
> 	PR python/23080:
> 	* NEWS: Update for new functions.
> 	* python/py-value.c (gdbpy_set_convenience_variable)
> 	(gdbpy_convenience_variable): New functions.
> 	* python/python-internal.h (gdbpy_convenience_variable)
> 	(gdbpy_set_convenience_variable): Declare.
> 	* python/python.c (python_GdbMethods): Add convenience_variable,
> 	set_convenience_variable.
> 
> doc/ChangeLog
> 2018-04-22  Tom Tromey  <tom@tromey.com>
> 
> 	PR python/23080:
> 	* python.texi (Basic Python): Document gdb.convenience_variable,
> 	gdb.set_convenience_variable.
> 
> testsuite/ChangeLog
> 2018-04-22  Tom Tromey  <tom@tromey.com>
> 
> 	PR python/23080:
> 	* gdb.python/python.exp: Add convenience variable tests.

Really very sorry about the delay. The patch looks good to me,
so go ahead and push.

Thanks!
-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]