Issue 155175
Summary LLDB `lldb.target.GetPlatform().Get(...)` returns "unimplemented" for qemu-user
Labels new issue
Assignees
Reporter patryk4815
    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.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to