[Lldb-commits] [PATCH] D58177: Fix lldb-server test suite for python3

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 14 05:04:37 PST 2019


labath added a comment.

Thanks for the review Stella. I was hoping someone would step in and tell me that there is a better way to do that. However :), I see two problems with your proposal:

- build.py is a standalone file, and so it is not easy for it to share code with other stuff. This can be solved with some use_lldb_suite magic or moving the script some place else, but then comes the second problem:
- I am not sure these two use cases are actually compatible. Here I specifically want to "reinterpret_cast" binary bytes without doing any sort of encoding. The only place where `to_string` is used in `build.py` currently is on a value retrieved from the windows registry. I'm not 100% sure, but it seems to me that using utf8 encoding (which is what `to_string` is doing) is precisely the right thing to do there.

With that in mind, I propose to do the following:

- leave build.py alone for now
- rename the new functions I'm introducing here to something less generic. Maybe `bitcast_to_string` and `bitcast_to_bytes`?

WDYT?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58177/new/

https://reviews.llvm.org/D58177





More information about the lldb-commits mailing list