查看设置的断点
(lldb) breakpoint list
如下面的例子:
(lldb) breakpoint set -M load
Breakpoint 12: 25 locations.
(lldb) breakpoint list
Current breakpoints:
12: name = 'load', locations = 25, resolved = 25, hit count = 0
12.1: where = MobileCoreServices`_LSPreferences::load(), address = 0x00000001072bc684, resolved, hit count = 0
12.2: where = libicucore.A.dylib`icu::CollationRoot::load(UErrorCode&), address = 0x00000001074eef18, resolved, hit count = 0
12.3: where = libicucore.A.dylib`icu::VTimeZone::load(icu::VTZReader&, UErrorCode&), address = 0x00000001075c2b34, resolved, hit count = 0
12.4: where = WebCore`WebCore::CachedFont::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa16a20, resolved, hit count = 0
12.5: where = WebCore`WebCore::CachedImage::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa18170, resolved, hit count = 0
12.6: where = WebCore`WebCore::CachedResource::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa1dc40, resolved, hit count = 0
12.7: where = WebCore`WebCore::CachedSVGDocumentReference::load(WebCore::CachedResourceLoader&, WebCore::ResourceLoaderOptions const&), address = 0x000000010aa2ad20, resolved, hit count = 0
12.8: where = WebCore`WebCore::CSSFontFace::load(), address = 0x000000010aafab20, resolved, hit count = 0
12.9: where = WebCore`WebCore::CSSFontFaceSource::load(WebCore::CSSFontSelector&), address = 0x000000010ab028a0, resolved, hit count = 0
12.10: where = WebCore`WebCore::FontFace::load(), address = 0x000000010ad5a2a0, resolved, hit count = 0
12.11: where = WebCore`WebCore::FontFaceSet::load(WTF::String const&, WTF::String const&, WebCore::DOMPromise<WTF::Vector<WTF::RefPtr<WebCore::FontFace>, 0ul, WTF::CrashOnOverflow, 16ul> >&&), address = 0x000000010ad5ad60, resolved, hit count = 0
12.12: where = WebCore`WebCore::FrameLoader::load(WebCore::DocumentLoader*), address = 0x000000010ad9fc70, resolved, hit count = 0
12.13: where = WebCore`WebCore::HRTFDatabaseLoader::load(), address = 0x000000010ae22e20, resolved, hit count = 0
12.14: where = WebCore`WebCore::HTMLMediaElement::load(), address = 0x000000010ae7e7f0, resolved, hit count = 0
12.15: where = WebCore`WebCore::JSFontFace::load(JSC::ExecState&), address = 0x000000010b1017f0, resolved, hit count = 0
12.16: where = WebCore`WebCore::MediaPlayer::load(WebCore::URL const&, WebCore::ContentType const&, WTF::String const&), address = 0x000000010b3d3ad0, resolved, hit count = 0
12.17: where = WebCore`WebCore::NullMediaPlayerPrivate::load(WTF::String const&), address = 0x000000010b3d6820, resolved, hit count = 0
12.18: where = WebCore`WebCore::MediaPlayerPrivateAVFoundation::load(WTF::String const&), address = 0x000000010b3d7880, resolved, hit count = 0
12.19: where = WebCore`WebCore::TextTrackLoader::load(WebCore::URL const&, WTF::String const&, bool), address = 0x000000010b8d89d0, resolved, hit count = 0
12.20: where = WebCore`WebCore::FrameLoader::load(WebCore::FrameLoadRequest const&), address = 0x000000010ada2570, resolved, hit count = 0
12.21: where = NLP`NL::SpotlightQueryConverter::load(NLSearchAppContext), address = 0x000000010fc3a4ca, resolved, hit count = 0
12.22: where = NLP`NL::SearchDateDisplayFormatter::load(), address = 0x000000010fc7c354, resolved, hit count = 0
12.23: where = libmarisa.dylib`marisa::Trie::load(char const*), address = 0x000000010fda4618, resolved, hit count = 0
12.24: where = JavaScriptCore`JSC::DFG::ByteCodeParser::load(unsigned int, unsigned int, JSC::DFG::GetByOffsetMethod const&, JSC::DFG::NodeType), address = 0x0000000110184900, resolved, hit count = 0
12.25: where = JavaScriptCore`JSC::DFG::ByteCodeParser::load(unsigned int, JSC::ObjectPropertyConditionSet const&, JSC::DFG::NodeType), address = 0x0000000110184ad0, resolved, hit count = 0
(lldb)
在使用命令设置断点时,符合条件的断点可能不止一个,并且,如果新加载文件后,符合条件的断点可能还会增加。当然,设置不存在的断点,断点信息也可以查看得到,但是其 locations 为 0 。
(lldb) breakpoint set --file test.m --line 100
Breakpoint 13: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint list
Current breakpoints:
13: file = 'test.m', line = 100, exact_match = 0, locations = 0 (pending)