aprantl added a comment.
In D85988#2222616 <https://reviews.llvm.org/D85988#2222616>, @clayborg wrote:
> Adrian: is there something I need to do to enable simulator tests? I added a
> test to TestSimulatorPlatform.py but if I run:
>
> $ ../debug/bin/llvm-lit -sv lldb/test/API/macosx/simulator
> llvm-lit:
> /Users/gclayton/Documents/src/lldb/mono/llvm-project/lldb/test/API/lit.cfg.py:147:
> warning: Could not set a default per-test timeout. Requires the Python
> psutil module but it could not be found. Try installing it via pip or via
> your operating system's package manager.
>
> Testing Time: 19.61s
> Unsupported: 1
>
> 1 warning(s) in tests
>
> It is unsupported? I am running this on a mac. Do I need to launch a
> simulator first? Extra arguments to the test suite?
No, the tests are supposed to run. Green dragon (which is running a consumer
macOS + consumer Xcode) is running this test. I know because it sometimes fails
because it couldn't launch the simulator :-(
The test was XFAILed a few weeks ago — is your LLVM up-to-date?
================
Comment at: lldb/source/Host/macosx/objcxx/Host.mm:509
triple_arch == llvm::Triple::x86_64);
- const char *cstr = data.GetCStr(&offset);
- if (cstr) {
- process_info.GetExecutableFile().SetFile(cstr,
FileSpec::Style::native);
+ llvm::StringRef str(data.GetCStr(&offset));
+ if (!str.empty()) {
----------------
data.GetCStringRef()?
http://llvm.org/doxygen/classllvm_1_1DataExtractor.html
Not sure if we surface that through the LLDB dataextractor, but we probably
should.
================
Comment at: lldb/source/Host/macosx/objcxx/Host.mm:510
+ llvm::StringRef str(data.GetCStr(&offset));
+ if (!str.empty()) {
+ process_info.GetExecutableFile().SetFile(str, FileSpec::Style::native);
----------------
```
if (str.empty())
return false;
```
================
Comment at: lldb/source/Host/macosx/objcxx/Host.mm:528
for (int i = 0; i < static_cast<int>(argc); ++i) {
- cstr = data.GetCStr(&offset);
- if (cstr)
- proc_args.AppendArgument(llvm::StringRef(cstr));
+ str = data.GetCStr(&offset);
+ if (!str.empty())
----------------
same here (GetCStringRef)
Perhaps also use a fresh variable to avoid confusion?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85988/new/
https://reviews.llvm.org/D85988
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits