I want to list the lldb variables in Xcode debugger such as
$0 = ...
$1 = ...
Which command should i enter?
You can use frameVariable to get a list of all variables in the stack frame.
- (void)viewDidLoad {
[super viewDidLoad];
NSHashTable *hashTable = [NSHashTable weakObjectsHashTable];
ABC *object = [[ABC alloc] init];
[hashTable addObject:object];
//NSLog(@"%@", [hashTable anyObject]);
object = nil;
int i = 0;
int j = 1;
}
frame variable
(ViewController *) self = 0x00007fa2275047d0
(SEL) _cmd = "viewDidLoad"
(NSConcreteHashTable *) hashTable = 0x000061000013f5e0
(ABC *) object = nil
(int) i = 0
(int) j = 1
You want to list all the variables you have defined in or are the result of expressions you've evaluated, right?
If so, there isn't a way to do that currently. But it would be straightforward to add. Please file an enhancement request with the lldb bug reporter:
and somebody will get to it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.