aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-source-styling.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-09-18 12:44:42 -0600
committerTom Tromey <tromey@adacore.com>2024-10-22 12:04:06 -0600
commit04ce6b03d9e940b6fb2ccd54539357714e7550bd (patch)
tree68c3fc221b0127ac3d1aae149bd7dd7e588f05a2 /gdb/testsuite/gdb.python/py-source-styling.c
parent8483536dea6e36e9f4a0949ecad0fcaafd62cf54 (diff)
downloadbinutils-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/testsuite/gdb.python/py-source-styling.c')
0 files changed, 0 insertions, 0 deletions