每当添加断点时,LLDB就会崩溃

时间:2019-01-07 10:09:48

标签: xcode xcode10

我在Xcode 10.1中有一个包含Objective C和Swift代码的项目。每当我在swift代码中应用断点时,LLDB崩溃,最终结束了调试会话。由于无法调试我,我完全陷入了这种情况代码。我曾尝试将断点移到其他行(由其他一些帖子建议),但它不起作用。 有什么解决方法吗?

  

来自调试器的消息:LLDB RPC服务器已崩溃。崩溃日志位于〜/ Library / Logs / DiagnosticReports中,并带有前缀“ lldb-rpc-server”。

崩溃摘要:

Thread 11 Crashed:: RPC packet thread for client tid 0028defc (2678524)
0   libsystem_kernel.dylib          0x00007fff6d6a223e __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff6d758c1c pthread_kill + 285
2   libsystem_c.dylib               0x00007fff6d60b1c9 abort + 127
3   com.apple.LLDB.framework        0x0000000106bd2443 swift::ModuleFile::fatal(llvm::Error) + 835
4   com.apple.LLDB.framework        0x0000000106be3753 swift::ModuleFile::getDeclCheckedImpl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 30515
5   com.apple.LLDB.framework        0x0000000106bd321e swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 78
6   com.apple.LLDB.framework        0x0000000106c0a707 swift::ModuleFile::loadExtensions(swift::NominalTypeDecl*) + 1911
7   com.apple.LLDB.framework        0x0000000106c13011 swift::SerializedModuleLoader::loadExtensions(swift::NominalTypeDecl*, unsigned int) + 49
8   com.apple.LLDB.framework        0x00000001062246bf swift::ASTContext::loadExtensions(swift::NominalTypeDecl*, unsigned int) + 63
9   com.apple.LLDB.framework        0x00000001062a6272 swift::NominalTypeDecl::getExtensions() + 82
10  com.apple.LLDB.framework        0x000000010631681e populateLookupTableEntryFromExtensions(swift::ASTContext&, swift::MemberLookupTable&, swift::NominalTypeDecl*, swift::DeclName, bool) + 46
11  com.apple.LLDB.framework        0x0000000106316e98 swift::NominalTypeDecl::lookupDirect(swift::DeclName, bool) + 616
12  com.apple.LLDB.framework        0x0000000106301a66 swift::ModuleDecl::lookupMember(llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::DeclContext*, swift::DeclName, swift::Identifier) const + 86
13  com.apple.LLDB.framework        0x000000010643e5a1 FindNamedDecls(swift::ASTContext*, swift::DeclBaseName const&, VisitNodeResult&, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >) + 1313
14  com.apple.LLDB.framework        0x0000000106437cdf VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 2703
15  com.apple.LLDB.framework        0x0000000106439e25 VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 11221
16  com.apple.LLDB.framework        0x000000010643d94c swift::ide::getTypeFromMangledSymbolname(swift::ASTContext&, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 204
17  com.apple.LLDB.framework        0x000000010705e2e7 lldb_private::SwiftASTContext::GetTypeFromMangledTypename(char const*, lldb_private::Status&) + 535
18  com.apple.LLDB.framework        0x0000000106db6241 DWARFASTParserSwift::ParseTypeFromDWARF(lldb_private::SymbolContext const&, DWARFDIE const&, lldb_private::Log*, bool*) + 933
19  com.apple.LLDB.framework        0x0000000106ee6a15 SymbolFileDWARF::ParseType(lldb_private::SymbolContext const&, DWARFDIE const&, bool*) + 209
20  com.apple.LLDB.framework        0x0000000106ee01fa SymbolFileDWARF::GetTypeForDIE(DWARFDIE const&, bool) + 486
21  com.apple.LLDB.framework        0x0000000106edf9ce SymbolFileDWARF::ResolveType(DWARFDIE const&, bool, bool) + 68
22  com.apple.LLDB.framework        0x0000000106edf94d SymbolFileDWARF::ResolveTypeUID(unsigned long long) + 45
23  com.apple.LLDB.framework        0x0000000106f2e87d lldb_private::Function::GetType() + 105
24  com.apple.LLDB.framework        0x0000000106f2e73c lldb_private::Function::GetStartLineSourceInfo(lldb_private::FileSpec&, unsigned int&) + 60
25  com.apple.LLDB.framework        0x0000000106c6c488 lldb_private::BreakpointResolverFileLine::FilterContexts(lldb_private::SymbolContextList&) + 262
26  com.apple.LLDB.framework        0x0000000106c6c88d lldb_private::BreakpointResolverFileLine::SearchCallback(lldb_private::SearchFilter&, lldb_private::SymbolContext&, lldb_private::Address*, bool) + 263
27  com.apple.LLDB.framework        0x0000000106d51f80 lldb_private::SearchFilter::DoModuleIteration(lldb_private::SymbolContext const&, lldb_private::Searcher&) + 346
28  com.apple.LLDB.framework        0x0000000106d51dd9 lldb_private::SearchFilter::Search(lldb_private::Searcher&) + 153
29  com.apple.LLDB.framework        0x0000000106f96b9f lldb_private::Target::AddBreakpoint(std::__1::shared_ptr<lldb_private::Breakpoint>, bool) + 203
30  com.apple.LLDB.framework        0x0000000106f97f29 lldb_private::Target::CreateBreakpoint(std::__1::shared_ptr<lldb_private::SearchFilter>&, std::__1::shared_ptr<lldb_private::BreakpointResolver>&, bool, bool, bool) + 249
31  com.apple.LLDB.framework        0x0000000106f98352 lldb_private::Target::CreateBreakpoint(lldb_private::FileSpecList const*, lldb_private::FileSpec const&, unsigned int, unsigned long long, lldb_private::LazyBool, lldb_private::LazyBool, bool, bool, lldb_private::LazyBool) + 920
32  com.apple.LLDB.framework        0x0000000103dda3d8 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int, unsigned long long, lldb::SBFileSpecList&) + 246
33  com.apple.LLDB.framework        0x0000000103dda2b0 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int, unsigned long long) + 62
34  com.apple.LLDB.framework        0x0000000103dda226 lldb::SBTarget::BreakpointCreateByLocation(char const*, unsigned int) + 64
35  lldb-rpc-server                 0x0000000103af6f5d rpc_server::_ZN4lldb8SBTarget26BreakpointCreateByLocationEPKcj::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 179
36  lldb-rpc-server                 0x0000000103b0073f rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 469
37  lldb-rpc-server                 0x0000000103b014e0 rpc_common::Connection::HandleRPCPacket(rpc_common::RPCPacket&) + 62
38  lldb-rpc-server                 0x0000000103b04f12 Packets::ProcessPackets() + 256
39  lldb-rpc-server                 0x0000000103b04d95 Packets::ReadThread() + 289
40  lldb-rpc-server                 0x0000000103b04c6f Packets::RunReadThread(void*) + 9
41  libsystem_pthread.dylib         0x00007fff6d756305 _pthread_body + 126
42  libsystem_pthread.dylib         0x00007fff6d75926f _pthread_start + 70
43  libsystem_pthread.dylib         0x00007fff6d755415 thread_start + 13

Thread 11 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000  rbx: 0x0000700010856000  rcx: 0x00007000108534f8  rdx: 0x0000000000000000
rdi: 0x0000000000003e0b  rsi: 0x0000000000000006  rbp: 0x0000700010853530  rsp: 0x00007000108534f8
r8: 0x000000000000000b   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000206
r12: 0x0000000000003e0b  r13: 0x0000000107fd4d70  r14: 0x0000000000000006  r15: 0x000000000000002d
rip: 0x00007fff6d6a223e  rfl: 0x0000000000000206  cr2: 0x00007fffa0349188

Complete crash log

崩溃正在快速代码中发生,Objective C代码运行正常。同样,它不是偶然的,它每次都在发生。 我还尝试清除所有Xcode缓存和派生数据。

1 个答案:

答案 0 :(得分:0)

我遇到同样的情况,希望我的解决方案对您有所帮助。 添加断点时Xcode LLDB崩溃的原因是我的项目名称(<p id="result"></p>)与Apple的框架相同。
将项目名称切换为另一个随机名称后,问题解决了。