]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/python: add gdb.Value.is_unavailable attribute
authorAndrew Burgess <aburgess@redhat.com>
Mon, 1 Sep 2025 15:58:58 +0000 (16:58 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 4 Sep 2025 21:18:59 +0000 (22:18 +0100)
commitb652ce7b808cd81346da587e4b4f7c3754c9d98e
treeb40a208552403eba435fc04bd7e233d2b3b3c6c4
parent95f21c0d25a8241251a1dfcf6e5d80701cd80a06
gdb/python: add gdb.Value.is_unavailable attribute

Add a new gdb.Value.is_unavailable attribute.  This is similar to the
existing Value.is_optimized_out attribute, but returns True if any
part of the value is <unavailable>.

The existing Value.is_optimized_out attribute returns true if any part
of the value is optimized out, so I thought that Value.is_unavailable
should work the same way.

There's also a test.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33345

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Reviewed-By: Christina Schimpe <christina.schimpe@intel.com>
gdb/NEWS
gdb/doc/python.texi
gdb/python/py-value.c
gdb/testsuite/gdb.python/py-value.c
gdb/testsuite/gdb.python/py-value.exp