diff options
author | Tom Tromey <tromey@adacore.com> | 2023-07-18 08:38:56 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-07-21 12:04:00 -0600 |
commit | 4f7d9afbcdfa3b223f51924925f9bc6b42fcdc0b (patch) | |
tree | 13ee9616140ddb24b830619f1ad312e8e81380bf /gdb/doc | |
parent | c24fd9547fb6836af022c99470dfdb13fa9f90fe (diff) | |
download | gdb-4f7d9afbcdfa3b223f51924925f9bc6b42fcdc0b.zip gdb-4f7d9afbcdfa3b223f51924925f9bc6b42fcdc0b.tar.gz gdb-4f7d9afbcdfa3b223f51924925f9bc6b42fcdc0b.tar.bz2 |
Document array indexing for Python gdb.Value
I noticed that the documentation for gdb.Value doesn't mention array
indexing.
Approved-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/python.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index 6f5533e..9c2c5ae 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -812,6 +812,13 @@ structure, then @code{bar} can also be accessed as follows: bar = some_val[foo_field] @end smallexample +If a @code{gdb.Value} has array or pointer type, an integer index can +be used to access elements. + +@smallexample +result = some_array[23] +@end smallexample + A @code{gdb.Value} that represents a function can be executed via inferior function call. Any arguments provided to the call must match the function's prototype, and must be provided in the order specified |