Objective-C 프로그램을 디버그하려고하는데, unsigned long long
변수를 16 진수로 인쇄해야합니다. lldb
디버거를 사용하고 있습니다. (lldb) 16 진수로 부호있는 long long을 인쇄하십시오.
진수로 short
을 인쇄하려면
(lldb) type format add --format hex short
(lldb) print bit
(short) $11 = 0x0000
그러나, 나는 그것이 unsigned long long
작동 할 수 없습니다.
// failed attempts:
(lldb) type format add --format hex (unsigned long long)
(lldb) type format add --format hex unsigned long long
(lldb) type format add --format hex unsigned decimal
(lldb) type format add --format hex long long
(lldb) type format add --format hex long
(lldb) type format add --format hex int
시뮬레이터에서 iOS 앱을 실행하고 있는데 차이가있는 경우. 이 typedef unsigned long long BigInt
나에게 아이디어를 준,
(lldb) type format add --format hex A
다음
// ObjC code
typedef int A;
:
주 GDB는'p'와'/ x' 사이에 공간을 허용하는 반면, lldb은 GDB에서 작동 x'하지, 그래서'P/않는다는 것을, 하지만 lldb에서는 'p/x'가되어야합니다. –