English 中文(简体)
我如何打印在GDB类型属性吗?
原标题:
  • 时间:2009-04-13 20:10:40
  •  标签:

Is there a way to print a type attribute from inside GDB?
E.g. Integer Size.

最佳回答

是的:

(gdb) p < em > < / em >的属性

一些属性是公认的,其他是t。(下面列出在什么年代,发现是一个布尔变量)。

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

这年代的列表< a href = " https://sourceware.org/gdb/current/onlinedocs/gdb/Omissions-from-Ada.html # Omissions-from-Ada”rel = " nofollow noreferrer " > Ada节< / >与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.

(嗯,这个列表可能会过时,因为我可以做整数,尽管第一颗子弹说它不是有效类型。)

问题回答

暂无回答




相关问题
热门标签