문제

내부 GDB에서 유형 속성을 인쇄하는 방법이 있습니까?
예를 들어 정수 크기.

도움이 되었습니까?

해결책

예:

(GDB) p thing'ttribute

일부 속성은 인식되고 다른 속성은 그렇지 않습니다. (아래에 나열된 내용에서 발견 된 부울 변수입니다.)

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 섹션 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.

(흠, 그 목록은 유형에 유효하지 않다는 첫 번째 총알에도 불구하고 정수를 할 수 있기 때문에 날짜가 될 수 있습니다.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top