[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-09 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision. kastiglione added reviewers: jingham, JDevlieghere, mib. Herald added a project: All. kastiglione requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. When using the `script` Python repl, SB objects are printed

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-09 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. What happens if you try to call __str__ after your change ? I have no objection with this change, I think rather it will greatly improve manipulating SBTypes in the interpreter ! Just making sure this passes the test suite and doesn't break the previous behavior Repositor

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-10 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. @mib I tried but failed to answer that in the original commit description. I have reworded it to be more clear. Here's the relevant paragraph: > For convenience, this change switches all SB classes that implement to > `__str__` to instead implement `__repr__`. **The

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-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. Makes sense to me. Maybe add a small shell test that includes the example from the description? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-10 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. Thanks for clarifying! LGTM with a test! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127458/new/ https://reviews.llvm.org/D127458 ___ lldb-commits maili

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-10 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. Note also that the tests use `str()` in many places, so we can be sure this hasn't regressed that. I will add a test for `repr`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127458/new/ https://reviews.llvm.org/D12745

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-10 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 435972. kastiglione added a comment. add test/API/sanity/TestReprStrEquality.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127458/new/ https://reviews.llvm.org/D127458 Files: lldb/bindings/macros.swig

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-10 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision. mib added a comment. Thanks @kastiglione ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127458/new/ https://reviews.llvm.org/D127458 ___ lldb-commits mailing list lldb-commit

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-10 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 435980. kastiglione added a comment. update TestConvenienceVariables.test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127458/new/ https://reviews.llvm.org/D127458 Files: lldb/bindings/macros.swig lld

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-10 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision. jingham added a comment. This looks good to me as well. The job of "recreating the object from an eval of the repr output" is not even possible for many SB objects, by the time the object was made it's lost the factory invocation that produced it. And anyway, I

[Lldb-commits] [PATCH] D127458: [lldb][bindings] Implement __repr__ instead of __str__

2022-06-11 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc7a56af3072c: [lldb][bindings] Implement __repr__ instead of __str__ (authored by kastiglione). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127458/new/ ht