2009-04-13 455 views

回答

8

是:

(GDB)p thing'attribute

某些属性的认可,而有些则没有。 (在什么下面列出,发现是一个布尔变量。)

gdb) p integer'size 
Attempt to use a type name as an expression 
(gdb) p found'size 
$2 = 8 
(gdb) p integer'first 
$3 = -2147483648 
(gdb) p integer'last 
$4 = 2147483647 

下面是从调试的Ada section用gdb名单:

Only a subset of the attributes are supported: 

    * 'First, 'Last, and 'Length on array objects (not on types and subtypes). 
    * 'Min and 'Max. 
    * 'Pos and 'Val. 
    * 'Tag. 
    * 'Range on array objects (not subtypes), but only as the right operand of the membership (in) operator. 
    * 'Access, 'Unchecked_Access, and 'Unrestricted_Access (a GNAT extension). 
    * 'Address. 

(嗯,该列表可能会过时,因为我可以做Integer'Last,尽管第一个子弹说,它是无效的类型。)