mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 18:20:12 +08:00
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.
This commit is contained in:
@ -387,6 +387,11 @@ as its result, then placing the value into the history will allow the
|
||||
user convenient access to those values via CLI history facilities.
|
||||
@end defun
|
||||
|
||||
@defun gdb.history_count ()
|
||||
Return an integer indicating the number of values in @value{GDBN}'s
|
||||
value history (@pxref{Value History}).
|
||||
@end defun
|
||||
|
||||
@findex gdb.convenience_variable
|
||||
@defun gdb.convenience_variable (name)
|
||||
Return the value of the convenience variable (@pxref{Convenience
|
||||
|
Reference in New Issue
Block a user