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
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
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
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.
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
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
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
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
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
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
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
11 matches
Mail list logo