[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D112973#3122496 , @stella.stamenova wrote: > Windows buildbot is broken: > > https://lab.llvm.org/buildbot/#/builders/83/builds/11865 eek, sorry. fix is here: https://reviews.llvm.org/D113650 Repository: rG LLVM G

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment. Windows buildbot is broken: https://lab.llvm.org/buildbot/#/builders/83/builds/11865 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Lawrence D'Anna via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbbef51eb43c2: [lldb] make it easier to find LLDB's python (authored by lawrence_danna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://re

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973 ___

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 386198. lawrence_danna marked 3 inline comments as done. lawrence_danna added a comment. cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973 Files: lldb/

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna added inline comments. Comment at: lldb/include/lldb/API/SBHostOS.h:23 + const char *GetScriptInterpreterInfo(); + JDevlieghere wrote: > Is still still relevant? nope. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. A few small nits but I'm very happy with the approach. Thanks Larry! Comment at: lldb/include/lldb/API/SBHostOS.h:23 + const char *GetScriptInterpreterInfo(); + Is still still relevant? Comment at: lldb/test/A

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-10 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 386170. lawrence_danna added a comment. changed internal apis to use StructuredData instead of char* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973 Files: l

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. Rather than percolating up a JSON string, we should use `StructuredData` (and `SBStructuredData` at the SB API layer) and only convert it to JSON at the very last moment. Comment at: lldb/tools/driver/Driver.cpp:410 +} else { + llvm::err

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-09 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 385712. lawrence_danna edited the summary of this revision. lawrence_danna added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973 Files:

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-09 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 385711. lawrence_danna added a comment. updated according to reviewer feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973 Files: lldb/bindings/interfac

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-02 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna added a comment. @JDevlieghere That approach would work great for my purposes, i'll update like that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973 __

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. I would do this: lldb --print-script-interpreter-info python making the interpreter the argument for this option. That seems clearer than having to provide two flags. language is overloaded anyway, because it can be a source language or a script interpreter languag

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-02 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. I was talking to Jim about this offline and one potential solution would be to have a flag that asks the current script interpreter for some of this relevant information. What that means would be different for every language, so the output would have to be able to

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-02 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. I still don't think adding python specific ways of getting at generic ScriptInterpreter features (e.g. the path to the lldb module for that script interpreter - not your fault but... - and the path to the script's native script runner binary) with language specific affo

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-01 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna updated this revision to Diff 383978. lawrence_danna added a comment. change lldb-python into a script instead of a feature of Driver.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112973/new/ https://reviews.llvm.org/D112973 Fil

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-01 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna added a comment. In D112973#3101602 , @JDevlieghere wrote: > FWIW `crashlog.py` has a good example of how to import LLDB. It's complicated > slightly by us having to honor the `LLDB_DEFAULT_PYTHON_VERSION`, but > otherwise it's pretty si

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. But I do agree with Jonas that we should find a less python-specific way to implement this. I don't think you need to actually fill in the Lua parts, but whoever does that shouldn't have to copy everything that was done for python, a lot of this should be shareable.

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. In D112973#3101602 , @JDevlieghere wrote: > I feel like this puts too much Python specific logic in the driver compared > to the convenience it brings. Even though we already leak python details > (like `--python-path`), LLDB h

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Since you do need to match the lldb module to the python it was built against, this seems a useful addition. The original --python-path was a bit unfortunate, we're supposed to be able to support multiple scripting interpreters (currently python & lua) and it would be

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-01 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. I feel like this puts too much Python specific logic in the driver compared to the convenience it brings. Even though we already leak python details (like `--python-path`), LLDB has always been designed to support several scripting languages. I'm not convinced this

[Lldb-commits] [PATCH] D112973: [lldb] make it easier to find LLDB's python

2021-11-01 Thread Lawrence D'Anna via Phabricator via lldb-commits
lawrence_danna created this revision. lawrence_danna added reviewers: jasonmolenda, JDevlieghere, jingham. Herald added subscribers: dang, mgorny. lawrence_danna requested review of this revision. Herald added a project: LLDB. It is surprisingly difficult to write a simple python script that can r