2
GDBの中から型属性を出力する方法はありますか?
など。 Integer'Size。GDBで型属性をどのように出力できますか?
GDBの中から型属性を出力する方法はありますか?
など。 Integer'Size。GDBで型属性をどのように出力できますか?
はい:
(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.
が(うーん、そのリストは日付することができます
gdbコマンドラインで「print sizeof(int)」と入力すると問題が解決すると思いますか? – dirkgently
質問にはadaというタグが付いているので、このタイプの属性は私には未知のものであると解釈し、sizeofは答えとは思わない。 – hlovdal
sizeof()はC/C++です...質問は間違いなくAda固有です。 – paxos1977