<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/155175>155175</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            LLDB `lldb.target.GetPlatform().Get(...)` returns "unimplemented" for qemu-user
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          patryk4815
      </td>
    </tr>
</table>

<pre>
    When using LLDB with a cross-compiled s390x binary under QEMU, calling `lldb.target.GetPlatform().Get()` from the Python API results in an `unimplemented error`.


### Compile hello binary
```
cat << EOF > hello.c
#include <stdio.h>
int main() {
 printf("hello");
    return 0;
}
EOF

zig cc --target=s390x-linux-musl -g -O0 hello.c -o hello.s390x`
```

### Repro
```
$ lldb
(lldb) version
lldb version 20.1.8
(lldb) settings set platform.plugin.qemu-user.architecture s390x
(lldb) target create -p qemu-user ./hello.s390x
Current executable set to '/Users/psondej/projekty/pwndbg/hello.s390x' (s390x).
(lldb) b main
Breakpoint 1: where = hello.s390x`main + 20 at hello.c:4:5, address = 0x0000000001008e74
(lldb) r
Process 14449 launched: '/Users/psondej/projekty/pwndbg/hello.s390x' (s390x)
Process 14449 stopped
* thread #1, stop reason = breakpoint 1.1
    frame #0: 0x0000000001008e74 hello.s390x`main at hello.c:4:5
   1    #include <stdio.h>
   2
   3    int main() {
-> 4             printf("hello");
 5
   6        return 0;
   7    }
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> lldb.target.GetPlatform().Get(lldb.SBFileSpec("/proc/self/exe"), lldb.SBFileSpec("/tmp/foo"))
error: unimplemented
>>>
```

### Expected

Starting from QEMU 8.1, there is support for `vFile` packets, which should allow remote file access via gdbstubs packets.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVV1v2zYU_TX0y4UEipIs68EPim0NBTo0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