Wednesday, 15 February 2012

xcode - Is it possible to filter LLDB output? -



xcode - Is it possible to filter LLDB output? -

when call, illustration image list, have huge number if them. currently, re-create out , work it. there no other way? i'd able image list | grep ...

so first off, "image list" takes module name argument, if know module looking for, can do:

(lldb) image list foundation [ 0] 18edd673-a010-3e99-956e-da594ce1fa80 0x00007fff8e357000 /system/library/frameworks/foundation.framework/versions/c/foundation

however, lldb command line doesn't have back upwards piping or filtering operations beyond commands offer. off-load sort of task script interpreter, since can take advantage of whole ecosystem provided scripting language. far, back upwards python, do:

(lldb) script >>> module in lldb.target.modules: ... if module.file.basename == "foundation": ... print module.file ... /system/library/frameworks/foundation.framework/versions/c/foundation

or whatever wanted do... lldb's python help pretty good, find out have available in python, do:

(lldb) script >>> help (lldb.sbmodule) help on class sbmodule in module lldb: etc...

and there's introductory web page python scripting at:

http://lldb.llvm.org/python-reference.html

xcode lldb

No comments:

Post a Comment