diff options
author | Tom Tromey <tromey@adacore.com> | 2024-09-18 12:44:42 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-10-22 12:04:06 -0600 |
commit | 04ce6b03d9e940b6fb2ccd54539357714e7550bd (patch) | |
tree | 68c3fc221b0127ac3d1aae149bd7dd7e588f05a2 /gdb/doc/gdb.texinfo | |
parent | 8483536dea6e36e9f4a0949ecad0fcaafd62cf54 (diff) | |
download | binutils-04ce6b03d9e940b6fb2ccd54539357714e7550bd.zip binutils-04ce6b03d9e940b6fb2ccd54539357714e7550bd.tar.gz binutils-04ce6b03d9e940b6fb2ccd54539357714e7550bd.tar.bz2 |
Implement 'Object_Size
This patch started as an attempt to allow the 'Size attribute to be
applied to types, and not just objects.
However, that turns out to be difficult due to the Ada semantcs of
'Size. In particular, Ada requires 'Size to denote the size of the
representation of the value, so for example Boolean'Size must be 1.
Implementing this properly requires information not readily available
to gdb... and while we could synthesize this information in many
cases, it also seemed to me that this wasn't strictly very useful when
debugging.
So instead, this patch adds support for the 'Object_Size attribute,
which is somewhat closer to 'sizeof'.
Note also that while 'Object_Size is defined for some dynamic types, I
chose not to implement this here, as again this information is not
readily available -- and I think it's preferable to error than to
print something that might be incorrect.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r-- | gdb/doc/gdb.texinfo | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 554608d..eb2aff9 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -18821,6 +18821,12 @@ operand of the membership (@code{in}) operator. @item @t{'Address}. + +@item +@t{'Size} is available for objects (not types). + +@item +@t{'Object_Size} is available, but not for indefinite types. @end itemize @item |