I have a typical UITableView app that has some cells with some labels..
How do you display the contents of the following using GDB? I have tried this below and cannot figure out what the syntax should be.
EDIT: I want to be able to display the contents of variables when the debugger hits a breakpoint
(gdb) p (NSString*)cell.detailTextLabel.text
There is no member named detailTextLabel.
(gdb) p (NSString*)[cell.detailTextLabel.text]
A syntax error near end of expression.
(gdb) p (NSString*)[cell detailTextLabel text]
A syntax error in expression, near `]'.
(gdb) p (NSString*)[cell detailTextLabel]
$2 = (NSString *) 0x0
(gdb) p (NSString*)[[cell detailTextLabel] text]
$3 = (NSString *) 0x0
Thanks
You can’t use dot notation inside the debugger, so instead of
cell.detailTextLabel.textyou would have to write[[cell detailTextLabel] text]. And try using the commandpoinstead ofp, sopo [[cell detailTextLabel] text]. Hope this helps.