Comments (31)
TARGETS -> debug-objc -> Build Settings -> Enable Hardened Runtime = NO
It's works in my clone
from objc-runtime.
TARGETS -> debug-objc -> Build Settings -> Enable Hardened Runtime = NO
It's works in my clone
Good solution
from objc-runtime.
They are the same both pointing to "build" path. [image: image.png] [image: image.png]
…
On Wed, Apr 1, 2020 at 5:05 AM RetVal @.***> wrote: I don’t know how to use Xcode. I just did ‘’’ DYLD_INSERT_LIBRARIES=path/to/libobjc.A.dylib lldb path/to/debug-objc ‘’’ maybe you can check the build location of the runtime and your demo app, make sure the location of these two was same. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIWVZEYWZGYZ7JKVRUBJSDRKMUXVANCNFSM4LSEBUYA .
I have the same problem, try everything i can do but none of them worked, so I give up the newest version,and try compile 756.2 which Git commit is 20d965f,and it worked!hope it can help
from objc-runtime.
TARGETS -> debug-objc -> Build Settings -> Enable Hardened Runtime = NO
It's works in my clone
thanks
from objc-runtime.
_task_restartable_ranges_register
is a new macOS 10.15 symbol. I'm guessing you just need to update your OS + Xcode.
from objc-runtime.
add the breakpoint to function objc_alloc
? have a try.
from objc-runtime.
I tried that and not working. The only change i made is to change signing's Team and use "Automatically manage signing" and change target of debug-objc's min target version to 10.14 to match mine.
What's your tested os & xcode version? Maybe I need to update xcode and os?
from objc-runtime.
Unfortunately updating to Catalina did not fix it either.
from objc-runtime.
OSX 10.15.3, Xcode 11.4
I think maybe you can running the demo project, and set a breakpoint to pause the process, type 'image list' to the console and check the path of the runtime.
from objc-runtime.
This is the output:
(lldb) image list
[ 0] F2AC94E8-A1C2-30F5-8727-84D92AD89951 0x0000000100000000 /Users/maxwang/Library/Developer/Xcode/DerivedData/objc-dnbfetcywolbragldaprohldvehz/Build/Products/Debug/debug-objc
[ 1] 1F893B81-89A5-3502-8510-95B97B9F730D 0x0000000100009000 /usr/lib/dyld
[ 2] 20AC082F-2DB7-3974-A2D4-8C5E01787584 0x00007fff6e517000 /usr/lib/libobjc.A.dylib
[ 3] 9A74FA97-7F7B-3929-B381-D9514B1E4754 0x00007fff37dbc000 /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
[ 4] DB8310F1-272D-3533-A840-3B390AF55C26 0x00007fff6c6b7000 /usr/lib/libSystem.B.dylib
[ 5] 9E632A1E-9622-33D6-BCCE-23AC16DAA6B7 0x00007fff35706000 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
[ 6] 1C880020-396D-3F91-BE27-5A09A9239F68 0x00007fff6c9f0000 /usr/lib/libc++abi.dylib
[ 7] 08199809-33CA-321E-9B9D-FD5B2BC64580 0x00007fff6c99d000 /usr/lib/libc++.1.dylib
[ 8] 5F90FFCE-403B-3724-991D-BA32401D99C5 0x00007fff6f4b3000 /usr/lib/system/libcache.dylib
[ 9] C7A5E3F7-1E5A-3785-875A-B6647082B614 0x00007fff6f4b9000 /usr/lib/system/libcommonCrypto.dylib
[ 10] A517E149-2D25-3C04-BCEF-F69149C85B18 0x00007fff6f4c5000 /usr/lib/system/libcompiler_rt.dylib
from objc-runtime.
the path of the runtime told that your app loaded the system version of the binary, so the breakpoint didn't make sense, check the snapshot of my screen, you can see the demo loaded the binary which was compiled from the project.
maybe you can check the build location of the runtime and your demo app, make sure the location of these two was same.
from objc-runtime.
How are you doing this? The debug-objc
binary has LC 13: LC_LOAD_DYLIB /usr/lib/libobjc.A.dylib
. Are you manually install_name_tool
ing this to a relative path? I had to use DYLD_INSERT_LIBRARIES=path/to/built/libobjc.A.dylib
. Not even sure why that worked given the load command is for the absolute path libobjc.A.dylib
.
from objc-runtime.
I could not find install_name_tool or DYLD_INSERT_LIBRARIES in Build Setting of debug-objc or objc target.
I did not change any settings after git clone. Shouldn't it be setting the build use the debug build of runtime when I just clone the project (I just cloned without changing anything, except cert/signing)?
What setting do you suggest I can check and try to change. I am not really familiar with which path is related to point to the right objc dylib.
from objc-runtime.
I don’t know how to use Xcode.
I just did
‘’’
DYLD_INSERT_LIBRARIES=path/to/libobjc.A.dylib lldb path/to/debug-objc
‘’’
from objc-runtime.
I don’t know how to use Xcode.
I just did
‘’’
DYLD_INSERT_LIBRARIES=path/to/libobjc.A.dylib lldb path/to/debug-objc
‘’’
maybe you can check the build location of the runtime and your demo app, make sure the location of these two was same.
from objc-runtime.
from objc-runtime.
ld64
links against the dylibs install path. For the built libobjc.A.dylib
this is /usr/lib/libobjc.A.dylib
as set by the Installation Directory
value of /usr/lib
in Xcode. So ld64
will put that as the LD_LOAD_DYLIB
for anything you link against the built library. However, Xcode also injects -frameword Foundation
into the main.o
objectfile as an LC_LINKER_OPTION
which implicitly imports /usr/lib/libobjc.A.dylib
. So the workaround for this whole thing seems ridiculous. I'd just stick to DYLD_INSERT_LIBRARIES=build/Debug/libobjc.A.dylib lldb debug-objc
.
from objc-runtime.
ba21fe7 this commit worked for me on Mojave and Catalina. (756.2 20d965f did not).
Thanks @programingHaozi for the idea to try other commits.
from objc-runtime.
Maybe you can check the SIP status of your machine, typing csrutil status
in your terminal, please make sure the status was disabled. I tested this using an empty machine and couldn't load the custom version of the runtime when the SIP was enabled, hope it make sense.
from objc-runtime.
Maybe you can check the SIP status of your machine, typing
csrutil status
in your terminal, please make sure the status was disabled. I tested this using an empty machine and couldn't load the custom version of the runtime when the SIP was enabled, hope it make sense.
After I set SIP disabled and compile, compile 799.1 an error occurred
dyld: lazy symbol binding failed: Symbol not found: _task_restartable_ranges_register
Referenced from: /Users/XXX/Library/Developer/Xcode/DerivedData/objc-durwwovfolhlzvbslduvjahbhifr/Build/Products/Debug/libobjc.A.dylib
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _task_restartable_ranges_register
Referenced from: /Users/XXX/Library/Developer/Xcode/DerivedData/objc-durwwovfolhlzvbslduvjahbhifr/Build/Products/Debug/libobjc.A.dylib
Expected in: /usr/lib/libSystem.B.dylib
and commit 20d965f compile successed which failed when SIP was enabled
by the way ,can I debug on iOS platform?
from objc-runtime.
Maybe you can check the SIP status of your machine, typing
csrutil status
in your terminal, please make sure the status was disabled. I tested this using an empty machine and couldn't load the custom version of the runtime when the SIP was enabled, hope it make sense.
@wsdwsd0829 any update?
from objc-runtime.
from objc-runtime.
They are the same both pointing to "build" path. [image: image.png] [image: image.png]
…
On Wed, Apr 1, 2020 at 5:05 AM RetVal @.***> wrote: I don’t know how to use Xcode. I just did ‘’’ DYLD_INSERT_LIBRARIES=path/to/libobjc.A.dylib lldb path/to/debug-objc ‘’’ maybe you can check the build location of the runtime and your demo app, make sure the location of these two was same. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#20 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIWVZEYWZGYZ7JKVRUBJSDRKMUXVANCNFSM4LSEBUYA .I have the same problem, try everything i can do but none of them worked, so I give up the newest version,and try compile 756.2 which Git commit is 20d965f,and it worked!hope it can help
This worked for me. 799.1 and 756.2, but not for objc.750
from objc-runtime.
Mac OS 10.15.4,Xcode 11.4. I have the same problem,how to solved?
from objc-runtime.
unfortunately�, it does not work for me.
Mac OS 10.15.4,Xcode 11.4
from objc-runtime.
work for me by disable csrutil
from objc-runtime.
TARGETS -> debug-objc -> Build Settings -> Enable Hardened Runtime = NO
It's works in my clone
save my day time
from objc-runtime.
TARGETS -> debug-objc -> Build Settings -> Enable Hardened Runtime = NO
It's works in my clone
really really thanks, I almost give up...
from objc-runtime.
SIP
csrutil disable
worked for me, thanks.
from objc-runtime.
TARGETS -> debug-objc -> Build Settings -> Enable Hardened Runtime = NO
It's works in my clone
It's worked on Catalina, but not on Big Sur.
from objc-runtime.
kyson老师的小专栏里说的很清楚了:https://xiaozhuanlan.com/runtime
from objc-runtime.
Related Issues (20)
- class_copyIvarList中为什么malloc要使用count+1 HOT 1
- runtime编译的时候,能加上libdispatch corefoundation的源码? HOT 2
- run debug-objc error HOT 15
- OSX10.13.5 Xcode9.2 Compile error HOT 3
- Xcode 10.1 macOS Mojave 10.14 compile fail
- Undefined symbol: _objc_opt_class HOT 6
- Is there any plan to update to the 756.2? HOT 1
- can't debug source code because of ENABLE_HARDENED_RUNTIME HOT 2
- 运行错误: dyld: lazy symbol binding failed: Symbol not found: _objc_opt_new HOT 2
- 我在官网上看到目前最新的版本是781,你这里写的799.1是哪里的? HOT 3
- Symbol not found: _sel_hash HOT 2
- Request for MacOS Big Sur support HOT 2
- 希望博主能加上 CoreFoundation、libdispatch 源码,拜托🙏🏻
- 在最新的Xcode Version 12.4 (12D4e) 及系统 macOS 11.2.3 上报错 dyld: Symbol not found: _sel_hash HOT 1
- objc源码,680,编译出错 : 'mach-o/dyld_priv.h' file not found 请求解决 HOT 1
- 希望博主能加上 CoreFoundation、libdispatch 源码,拜托🙏🏻
- demo crash HOT 5
- Supplement my question
- Xcode 9 无法运行 debug HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from objc-runtime.