diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-01-24 15:19:43 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-01-26 21:58:12 +0000 |
commit | 30a87e90be195dcce555a0904cc5dbd960349271 (patch) | |
tree | 0d2c98c5a8416afabe6a39e141928b1fb15d0a56 /gdb/NEWS | |
parent | 51d185a65f3679f887d456e20d22475ac8586938 (diff) | |
download | gdb-30a87e90be195dcce555a0904cc5dbd960349271.zip gdb-30a87e90be195dcce555a0904cc5dbd960349271.tar.gz gdb-30a87e90be195dcce555a0904cc5dbd960349271.tar.bz2 |
gdb/python: add gdb.history_count function
Add a new function gdb.history_count to the Python api, this function
returns an integer, the number of items in GDB's value history.
This is useful if you want to pull items from the history by their
absolute number, for example, if you wanted to show a complete history
list. Previously we could figure out how many items are in the
history list by trying to fetch the items, and then catching the
exception when the item is not available, but having this function
seems nicer.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -109,6 +109,9 @@ show debug lin-lwp integer, the index of the new item in the history list, is returned. + ** New function gdb.history_count(), which returns the number of + values in GDB's value history. + ** New gdb.events.gdb_exiting event. This event is called with a gdb.GdbExitingEvent object which has the read-only attribute 'exit_code', which contains the value of the GDB exit code. This |