Giter Club home page Giter Club logo

lgcooci / kcobjc4_debug Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 315.0 23.91 MB

🌈可编译苹果官方源码objc!现在有objc4底层源码,以及libmalloc等可编译版本,大家可以自由LLDB调试!

License: MIT License

C 60.59% C++ 12.80% Objective-C 7.13% Rich Text Format 0.20% Batchfile 0.02% Assembly 2.85% Objective-C++ 9.06% DTrace 0.09% Shell 0.22% Perl 0.54% Makefile 0.74% Roff 3.55% sed 0.01% Ruby 0.01% Python 1.28% M4 0.03% HTML 0.69% CMake 0.03% Swift 0.15% Lua 0.04%
apple-source libmalloc libobjc malloc objc objc-debug objc4 objc4-750 objc4-779 objc4-781 objc4-runtime

kcobjc4_debug's People

Contributors

lgcooci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kcobjc4_debug's Issues

xcode13下奔溃

Assertion failed: (sel_registerName(sel_getName(meth.name())) == meth.name()), function methodizeClass, file objc-runtime-new.mm, line 1536.
warning: could not find Objective-C class data in the process. This may reduce the quality of type information available.
(lldb)

Xcode 11.2 无法 调试

新建 target 需要 关闭 hardened runtime才可以调试 对比你可以调试的配置, 发现了这个解决方案

781运行报错

xcode 11.7、系统macOS Big Sur 11.01运行781那个项目报错:
dyld: Symbol not found: _sel_hash
Referenced from: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
Expected in: /Users/zhongguangzhou/Library/Developer/Xcode/DerivedData/objc-dcyrbcipeblzjtdkwzjqupppofta/Build/Products/Debug/libobjc.A.dylib
in /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation

是最新系统的问题吗?

Xcode 12.2 MacOS 11..0.1 objc4-781 编译失败

objc4_debug-master/objc4-781/runtime/objc-runtime-new.h:290:5: error: static_assert failed due to requirement 'bucketsMask >= ((unsigned long long)140737454800896ULL)' "Bucket field doesn't have enough bits for arbitrary pointers."
static_assert(bucketsMask >= MACH_VM_MAX_ADDRESS, "Bucket field doesn't have enough bits for arbitrary pointers.");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings and 1 error generated.

Xcode 12.2
MacOS 11..0.1
objc4-781 编译失败

Unexpected character <U+1F92F> at objc-runtime-new.h for 838 & 841

First thank you for providing this debug version of objc runtime.

OS version: Monterey 12.5.1
MacBook Pro (Retina, 13-inch, Early 2015)
Processor 2.7 GHz Dual-Core Intel Core i5

Xcode Version 14.0.1 (14A400)

Build error is Unexpected character <U+1F92F>, which is the 🤯 symbol, as below pictures shows.

I tried to replace that symbol with some random integer, but it will cause dyld throw exception at runtime.

Any help is appreciated.

compile error

请问怎么暴露私有的头文件?

比如说我想暴露objc-runtime-new.h,我在objc这个target里把这个头文件拖拽到public的区域。编译不能通过,提示找不到"PointerUnion.h"头文件

运行KCObjc target崩溃

运行的是objc4-781工程,报错
mac系统是11.0.1
xcode是12.1

大佬能帮忙分析下是啥问题吗?下面是报错的信息,感谢!

dyld: Symbol not found: _sel_hash Referenced from: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation Expected in: /Users/xxx/Build/Products/Debug/libobjc.A.dylib in /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation

objc4-818.2 在MaxOS 12.2.1 运行奔溃:

objc4-818.2 在MaxOS 12.2.1 运行奔溃:
Assertion failed: (sel_registerName(sel_getName(meth.name())) == meth.name()), function methodizeClass, file objc-runtime-new.mm, line 1536.
请问博主如何解决?

781源码中断点不生效

Mac os: 10.15.7
Xcode: 12.1

Cooci老师,781代码在main函数中打的断点可以生效,command+左键也可以调到源码中,但是在源码中_objc_rootAlloc、_objc_init这些方法里的断点全部不生效。
1606151612163

Xcode 15.0 M1 Max问题

你好,感谢提供这么方便的调试工具。
请问下 Xcode 15.0,MacOS 14.0,Mac Studio iOS甄姬无法编译怎么处理?提示
Ad Hoc code signing is not allowed with SDK 'iOS 17.0',

Mac 也crash在这里
void method_list_t::setFixedUp() {
lockdebug::assert_locked(&runtimeLock);
ASSERT(!isFixedUp());
entsizeAndFlags = entsizeAndFlags| fixed_up_method_list;
}

iOS14 _objc_storeWeak crash 有遇到过没?

kernel_version : Darwin Kernel Version 20.1.0: Fri Oct 30 00:34:15 PDT 2020; root:xnu-7195.42.3~1/RELEASE_ARM64_T8010
process_name : BaiduBoxApp
process_id : 3421
parent_process_id : 1
Exception Codes: #0 at 0x00000001d94cc1f0
Exception Type: SIGABRT
ExtraInfo:{}
Code Type: arm64
OS Version: iPhone OS 14.2 (18B92)
Hardware Model: iPhone9,1
Launch Time: 2021-02-28 23:46:41
Date/Time: 2021-02-28 23:47:10
Thread 0 Crashed:
0 libsystem_kernel.dylib ___abort_with_payload (in libsystem_kernel.dylib) 8
1 libsystem_kernel.dylib _abort_with_payload_wrapper_internal (in libsystem_kernel.dylib) 0
2 libobjc.A.dylib _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) (in libobjc.A.dylib) 104
3 libobjc.A.dylib _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) (in libobjc.A.dylib) 0
4 libobjc.A.dylib _weak_clear_no_lock (in libobjc.A.dylib) 0
5 libobjc.A.dylib _objc_storeWeak (in libobjc.A.dylib) 348
6 WebKit -[WKScriptMessage _initWithBody:webView:frameInfo:name:world:] (in WebKit) 136
7 WebKit ScriptMessageHandlerDelegate::didPostMessage(WebKit::WebPageProxy&, WebKit::FrameInfoData&&, API::ContentWorld&, WebCore::SerializedScriptValue&) (in WebKit) 204
8 WebKit WebKit::WebUserContentControllerProxy::didPostMessage(WTF::ObjectIdentifierWebKit::WebPageProxyIdentifierType, WebKit::FrameInfoData&&, unsigned long long, IPC::DataReference const&, WTF::CompletionHandler<void (IPC::DataReference const&, WTF::String const&)>&&) (in WebKit) 532
9 WebKit void IPC::handleMessageAsync<Messages::WebUserContentControllerProxy::DidPostMessage, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::)(WTF::ObjectIdentifierWebKit::WebPageProxyIdentifierType, WebKit::FrameInfoData&&, unsigned long long, IPC::DataReference const&, WTF::CompletionHandler<void (IPC::DataReference const&, WTF::String const&)>&&)>(IPC::Connection&, IPC::Decoder&, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::)(WTF::ObjectIdentifierWebKit::WebPageProxyIdentifierType, WebKit::FrameInfoData&&, unsigned long long, IPC::DataReference const&, WTF::CompletionHandler<void (IPC::DataReference const&, WTF::String const&)>&&)) (in WebKit) 3232
10 WebKit WebKit::WebUserContentControllerProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) (in WebKit) 76
11 WebKit IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) (in WebKit) 116
12 WebKit WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) (in WebKit) 36
13 WebKit IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_deleteIPC::Decoder >) (in WebKit) 596
14 WebKit IPC::Connection::dispatchIncomingMessages() (in WebKit) 492
15 JavaScriptCore WTF::RunLoop::performWork() (in JavaScriptCore) 528
16 JavaScriptCore WTF::RunLoop::performWork(void
) (in JavaScriptCore) 32
17 CoreFoundation _CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION (in CoreFoundation) 24
18 CoreFoundation ___CFRunLoopDoSource0 (in CoreFoundation) 204
19 CoreFoundation ___CFRunLoopDoSources0 (in CoreFoundation) 256
20 CoreFoundation ___CFRunLoopRun (in CoreFoundation) 776
21 CoreFoundation _CFRunLoopRunSpecific (in CoreFoundation) 572
22 GraphicsServices _GSEventRunModal (in GraphicsServices) 160
23 UIKitCore -[UIApplication _run] (in UIKitCore) 1052
24 UIKitCore _UIApplicationMain (in UIKitCore) 164
25 BaiduBoxApp main (in BaiduBoxApp) (main.m:28) 24
26 libdyld.dylib _start (in libdyld.dylib) 4

info.plist

编译运行的时候找不到这个文件咋办

无法进入断点

KCObjcBuild[80175:963663] Hello, World! KCObjcBuild was compiled with optimization - stepping may behave oddly; variables may not be available.

目前无法正确的使用断点,感觉整个是乱的,查过相关配置,是debug模式,并且优化等级为None

Mac 系统 12.0.1 Xcode版本13.2.1

无法进入断点

KCObjcBuild[80175:963663] Hello, World! KCObjcBuild was compiled with optimization - stepping may behave oddly; variables may not be available.

目前无法正确的使用断点,感觉整个是乱的,查过相关配置,是debug模式,并且优化等级为None

不能找到uint32_t和uint64_t

在llvm-MathExtras.h文件中出现错误, 不知道什么原因:
Unknown type name 'uint32_t'
Unknown type name 'uint64_t'

_sel_hash

dyld: Symbol not found: _sel_hash
Referenced from: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
Expected in: /Users/xiuxin/Library/Developer/Xcode/DerivedData/objc-bwlfwhghsmulfudmcqtfprllhkut/Build/Products/Debug/libobjc.A.dylib
in /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
有人碰到过这个错误吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.