Hi, my swift project has 500+ dependencies which is binary framework managed by CocoaPods, when hitting the breakpoint, the lldb will take 2min+ to resolve the value.
I use log enable lldb break
to see what is doing when hitting a breakpoint, and there are some logs print repeatly, in our project it prints 281 times. Here is part of the log:
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() add at addr = 0x10467f990
Hit breakpoint location: -267.1:
module = /Users/duanjitong/Library/Developer/Xcode/DerivedData/OurProjectiPhone-cywwwwqseeqvrecexceupfmakzax/Build/Products/Debug-iphoneos/OurProject4iPhoneWithoutExtension.app/OurProject4iPhoneWithoutExtension
compile unit = main.m
function = main
location = /Users/duanjitong/Documents/OurProject/OurProjectUniversal/OurProjectUniversal/main.m:14
address = 0x000000010467f990
resolved = true
hardware = false
hit count = 1
, stopping.
Target::RemoveBreakpointByID (break_id = -267, internal = yes)
Target::DisableBreakpointByID (break_id = -267, internal = yes)
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() remove at addr = 0x10467f990
Process::PerformAction returning from action with m_should_stop: 1.
Target::RemoveBreakpointByID (break_id = 0, internal = no)
Target::DisableBreakpointByID (break_id = 0, internal = no)
Target::AddBreakpoint (internal = yes) => break_id = -268: address = OurProject4iPhoneWithoutExtension[0x0000000100107990]
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() add at addr = 0x10467f990
Hit breakpoint location: -268.1:
module = /Users/duanjitong/Library/Developer/Xcode/DerivedData/OurProjectiPhone-cywwwwqseeqvrecexceupfmakzax/Build/Products/Debug-iphoneos/OurProject4iPhoneWithoutExtension.app/OurProject4iPhoneWithoutExtension
compile unit = main.m
function = main
location = /Users/duanjitong/Documents/OurProject/OurProjectUniversal/OurProjectUniversal/main.m:14
address = 0x000000010467f990
resolved = true
hardware = false
hit count = 1
, stopping.
Target::RemoveBreakpointByID (break_id = -268, internal = yes)
Target::DisableBreakpointByID (break_id = -268, internal = yes)
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() remove at addr = 0x10467f990
Process::PerformAction returning from action with m_should_stop: 1.
Target::RemoveBreakpointByID (break_id = 0, internal = no)
Target::DisableBreakpointByID (break_id = 0, internal = no)
Target::AddBreakpoint (internal = yes) => break_id = -269: address = OurProject4iPhoneWithoutExtension[0x0000000100107990]
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() add at addr = 0x10467f990
Hit breakpoint location: -269.1:
module = /Users/duanjitong/Library/Developer/Xcode/DerivedData/OurProjectiPhone-cywwwwqseeqvrecexceupfmakzax/Build/Products/Debug-iphoneos/OurProject4iPhoneWithoutExtension.app/OurProject4iPhoneWithoutExtension
compile unit = main.m
function = main
location = /Users/duanjitong/Documents/OurProject/OurProjectUniversal/OurProjectUniversal/main.m:14
address = 0x000000010467f990
resolved = true
hardware = false
hit count = 1
, stopping.
Target::RemoveBreakpointByID (break_id = -269, internal = yes)
Target::DisableBreakpointByID (break_id = -269, internal = yes)
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() remove at addr = 0x10467f990
Process::PerformAction returning from action with m_should_stop: 1.
Target::RemoveBreakpointByID (break_id = 0, internal = no)
Target::DisableBreakpointByID (break_id = 0, internal = no)
Target::AddBreakpoint (internal = yes) => break_id = -270: address = OurProject4iPhoneWithoutExtension[0x0000000100107990]
GDBRemoteCommunicationClient::SendGDBStoppointTypePacket() add at addr = 0x10467f990
Hit breakpoint location: -270.1:
module = /Users/duanjitong/Library/Developer/Xcode/DerivedData/OurProjectiPhone-cywwwwqseeqvrecexceupfmakzax/Build/Products/Debug-iphoneos/OurProject4iPhoneWithoutExtension.app/OurProject4iPhoneWithoutExtension
compile unit = main.m
function = main
location = /Users/duanjitong/Documents/OurProject/OurProjectUniversal/OurProjectUniversal/main.m:14
address = 0x000000010467f990
resolved = true
hardware = false
hit count = 1
, stopping.
Target::RemoveBreakpointByID (break_id = -270, internal = yes)
Target::DisableBreakpointByID (break_id = -270, internal = yes)
So anyone knows why the lldb hits the line 14 in main.m so many times? Is there a way could avoid this?