Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced Apple Debugging Chapter 1: Getting Started script not working #28

Open
100mango opened this issue Apr 22, 2020 · 7 comments
Open

Comments

@100mango
Copy link

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
@jonasz88
Copy link

jonasz88 commented May 10, 2020

@DerekSelander I have the same problem :(

@aaronash
Copy link
Contributor

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.

@romero-ios
Copy link

I am having the same issue, even after following @aaronash's suggestion

@Ho0lo0vo0
Copy link

Ho0lo0vo0 commented Aug 9, 2022

Allowed value for target.language is objective-c not objc
However, afterwards, there comes new issue:
Multilple interal symbols found for 'count'

@kasimok
Copy link

kasimok commented Jan 10, 2023

Allowed value for target.language is objective-c not objc 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.

@tony-go
Copy link

tony-go commented Jul 9, 2023

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 :/

@tony-go
Copy link

tony-go commented Jul 9, 2023

I'll take a deeper look at the script tomorrow to see what I could do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants