diff options
author | Tom Tromey <tromey@adacore.com> | 2023-07-24 07:29:46 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-09-05 11:10:15 -0600 |
commit | 59668c9d8c2fd10a521b06f2183b054498421d66 (patch) | |
tree | d1094cf5340025357039d6f6ecfbdaffcd8ce996 /gdb/NEWS | |
parent | 91c7233d2da89a6bd4e784031af08c61cb1a5cff (diff) | |
download | gdb-59668c9d8c2fd10a521b06f2183b054498421d66.zip gdb-59668c9d8c2fd10a521b06f2183b054498421d66.tar.gz gdb-59668c9d8c2fd10a521b06f2183b054498421d66.tar.bz2 |
Add new Python APIs to support DAP value display
gdb's language code may know how to display values specially. For
example, the Rust code understands that &str is a string-like type, or
Ada knows how to handle unconstrained arrays. This knowledge is
exposed via val-print, and via varobj -- but currently not via DAP.
This patch adds some support code to let DAP also handle these cases,
though in a somewhat more generic way.
Type.is_array_like and Value.to_array are added to make Python aware
of the cases where gdb knows that a structure type is really
"array-like".
Type.is_string_like is added to make Python aware of cases where gdb's
language code knows that a type is string-like.
Unlike Value.string, these cases are handled by the type's language,
rather than the current language.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -269,6 +269,9 @@ info main ** gdb.Value now has the 'assign' method. + ** gdb.Value now has the 'to_array' method. This converts an + array-like Value to an array. + ** gdb.Progspace now has the new method "objfile_for_address". This returns the gdb.Objfile, if any, that covers a given address. @@ -278,6 +281,11 @@ info main inferior specific, then this field contains None. This field can be written too. + ** gdb.Type now has the "is_array_like" and "is_string_like" + methods. These reflect GDB's internal idea of whether a type + might be array- or string-like, even if they do not have the + corresponding type code. + *** Changes in GDB 13 * MI version 1 is deprecated, and will be removed in GDB 14. |