Discussion:
[Bug python/23080] New: add API to define convenience variables
tromey at sourceware dot org
2018-04-18 17:07:51 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23080

Bug ID: 23080
Summary: add API to define convenience variables
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

It should be possible to define or set a convenience variable from Python.
It would also be good to be able to get the value of a convenience
variable without resorting to gdb.parse_and_eval.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-04-22 21:06:27 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23080

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I have a patch for this
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-05-31 21:01:59 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23080

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7729052b5377bfbf1c5ec5eaab59dd5071d4c5b1

commit 7729052b5377bfbf1c5ec5eaab59dd5071d4c5b1
Author: Tom Tromey <***@tromey.com>
Date: Sun Apr 22 15:13:09 2018 -0600

Add basic Python API for convenience variables

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.

2018-04-22 Tom Tromey <***@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 <***@tromey.com>

PR python/23080:
* python.texi (Basic Python): Document gdb.convenience_variable,
gdb.set_convenience_variable.

testsuite/ChangeLog
2018-04-22 Tom Tromey <***@tromey.com>

PR python/23080:
* gdb.python/python.exp: Add convenience variable tests.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-05-31 21:03:21 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23080

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |8.2

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...