Is there a way to print a type attribute from inside GDB?
E.g. Integer Size.
我如何打印在GDB类型属性吗?
原标题:
最佳回答
是的:
(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.
(嗯,这个列表可能会过时,因为我可以做整数,尽管第一颗子弹说它不是有效类型。)
问题回答
暂无回答
相关问题
热门标签
- winforms
- combobox
- fogbugz
- java
- date
- internationalization
- asp.net
- iis
- url-rewriting
- urlrewriter
- c#
- enums
- ocaml
- haxe
- algorithm
- string
- viewstate
- .net
- c++
- c
- symbol-table
- mysql
- database
- postgresql
- licensing
- migration
- vb.net
- vb6
- declaration
- vb6-migration
- python
- psycopg2
- backup
- vmware
- virtualization
- gnu-screen
- authentication
- desktop
- excel
- xll
- cultureinfo
- regioninfo
- oracle
- client
- session
- download
- html
- virtual
- constructor
- scenarios
- perl
- full-text-search
- javascript
- ajax
- testing
- oop
- inheritance
- vim
- encapsulation
- information-hiding