aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/python.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-07-24 07:29:46 -0600
committerTom Tromey <tromey@adacore.com>2023-09-05 11:10:15 -0600
commit59668c9d8c2fd10a521b06f2183b054498421d66 (patch)
treed1094cf5340025357039d6f6ecfbdaffcd8ce996 /gdb/testsuite/gdb.python/python.c
parent91c7233d2da89a6bd4e784031af08c61cb1a5cff (diff)
downloadbinutils-59668c9d8c2fd10a521b06f2183b054498421d66.zip
binutils-59668c9d8c2fd10a521b06f2183b054498421d66.tar.gz
binutils-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/testsuite/gdb.python/python.c')
0 files changed, 0 insertions, 0 deletions