LLDB
LLDB copied to clipboard
Advanced Apple Debugging Chapter 1: Getting Started script not working
Thanks
(lldb) sys echo "$(dclass -t swift)" | grep -v _ | grep "\." | cut -d. - f1 | uniq | wc -l
error: error: error: use of undeclared identifier 'objc_copyClassList'
error: while importing modules:
error: Header search couldn't locate module ObjectiveC
@DerekSelander I have the same problem :(
It looks like Apple changed the default language context from Objective-C to Swift in a recent Xcode build :(. You can change the current context with: settings set target.language objc
If you add that at the end of your ~/.lldbinit
I believe it should set it on every run.
I was running into a similar error and this worked for me.
I am having the same issue, even after following @aaronash's suggestion
Allowed value for target.language is objective-c
not objc
However, afterwards, there comes new issue:
Multilple interal symbols found for 'count'
Allowed value for target.language is
objective-c
notobjc
However, afterwards, there comes new issue:Multilple interal symbols found for 'count'
Actually, settings set target.language objc
and settings set target.language objetive-c
are the same.
Hey people 👋🏼
I got a similar issue:
➜ ~ lldb
(lldb) dclass -t swift
Dumping classes
error: error: expression failed to parse:
error: <user expression 0>:15:23: use of undeclared identifier 'objc_copyClassList'
Class *allClasses = objc_copyClassList(&count);
^
error: while importing modules:
error: Header search couldn't locate module ObjectiveC
Also, try to add settings set target.language objective-c
and it didn't fix it.
I just opened the last edition of the book, so I'm not enough familiar with all of this to suggest a solution :/
I'll take a deeper look at the script tomorrow to see what I could do.