2009-04-13 10 views
2

GDBの中から型属性を出力する方法はありますか?
など。 Integer'Size。GDBで型属性をどのように出力できますか?

+0

gdbコマンドラインで「print sizeof(int)」と入力すると問題が解決すると思いますか? – dirkgently

+0

質問にはadaというタグが付いているので、このタイプの属性は私には未知のものであると解釈し、sizeofは答えとは思わない。 – hlovdal

+0

sizeof()はC/C++です...質問は間違いなくAda固有です。 – paxos1977

答えて

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 

はここでgdbでデバッグのAda sectionからのリストです:私は可能性があるので、

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. 

が(うーん、そのリストは日付することができます

関連する問題