The method -weekday NSDateComponentsreturns int. But it podoes not work with primitive value types, only with pointer types.
In this case, it converts the integer output of this method,, 0x2into a pointer and looks for the object with the address of the pointer 0x2. He cannot find anything, therefore he gives this message.
Use pinstead with appropriate typecasting if necessary:
(gdb) p (int) [weEndDayTime weekday]
$1 = 2
source
share