[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. Jim's suggestion made me think that if we make a subcommand for this, it would be nice to have some completion handling. I know it would probably require you to move away from the python function but this is just a suggestion for later improvements. Repository: rG LLVM

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-25 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D120292#3346030 , @JDevlieghere wrote: > I like Jim's suggestion Same same ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120292/new/ https://reviews.llvm.org/D120292 __

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-25 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. I like Jim's suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120292/new/ https://reviews.llvm.org/D120292 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-24 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Could you use `help --scripting` (`help -s`) or maybe `help --api`? Then you could also do `apropos -s` if you ended up adding an apropos feature in the script interface, which would be consistent and fairly discoverable. Then for folks that used it all the time they

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-24 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. It's too bad `script` doesn't have subcommands, because that might have been a natural place for such a command. Are there any commands you think this could be added? Or would this have to be a new top level command? A new top-level command seems unfortunate. Speak

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-24 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. This is really great, this is going to save me a lot of time. I wonder if we should take this even further and make it a first class command in lldb, similar to `apropos`. (I wouldn't make it part of apropos, because it can already be overwhelming.) By making it it

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. In D120292#3338155 , @kastiglione wrote: > @jasonmolenda one advantage this has over grepping is that the python > specific extensions to SB are visible. That's true too. I mostly meant my comment as in, "I find this feat

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/bindings/python/python-extensions.swig:528-533 +def find(pattern, flags=re.I): +""" +Find matching SB methods/properties. See also Python's builtin `help()`. +""" +import lldb +import re kastiglione

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/bindings/python/python-extensions.swig:528-533 +def find(pattern, flags=re.I): +""" +Find matching SB methods/properties. See also Python's builtin `help()`. +""" +import lldb +import re mib

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/bindings/python/python-extensions.swig:528-533 +def find(pattern, flags=re.I): +""" +Find matching SB methods/properties. See also Python's builtin `help()`. +""" +import lldb +import re kastiglione

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added inline comments. Comment at: lldb/bindings/python/python-extensions.swig:528-533 +def find(pattern, flags=re.I): +""" +Find matching SB methods/properties. See also Python's builtin `help()`. +""" +import lldb +import re oh,

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-22 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. @jasonmolenda one advantage this has over grepping is that the python specific extensions to SB are visible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120292/new/ https://reviews.llvm.org/D120292 _

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-21 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. This revision is now accepted and ready to land. LGTM! Could you add a little test to exercise the command ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120292/new/ https://reviews.llvm.org/D120292

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-21 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda added a comment. Nice. tbh when I'm SB API scripting, I am often sitting in include/lldb/API and grepping for keywords, because I can't remember exactly which class provides the API, or what arguments it takes or whatever. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[Lldb-commits] [PATCH] D120292: [lldb] Add lldb.find helper function

2022-02-21 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: mib, JDevlieghere, jasonmolenda. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Add `lldb.find()`, a function for interactive lookup and discovery of SB API. >Fro