aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-01-24 15:19:43 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-01-26 21:58:12 +0000
commit30a87e90be195dcce555a0904cc5dbd960349271 (patch)
tree0d2c98c5a8416afabe6a39e141928b1fb15d0a56 /gdb/NEWS
parent51d185a65f3679f887d456e20d22475ac8586938 (diff)
downloadgdb-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/NEWS3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 31dff78..e190059 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -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