-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot attach to GDB server of QEMU for riscv64 #752
Comments
Looks like QEmu is sending a "process stopped" notification while CodeLLDB has not yet registered that a process exists. |
I'm attaching to this QEMU machine. I'm trying to set up VSCode for one of my projects. If you want to recreate my setup, you can clone this repo. I've provided a I also have a Docker container for building, so you shouldn't need a RISC-V toolchain (pull from docker run -it --rm -v "$(pwd):/src" -p "1234:1234" trmckay/rust-riscv python3 build.py debug_server and it will build the project and launch it in QEMU with a GDB server. You may have to use host networking or play with the I'd say do the Docker stuff in a terminal, then try to attach with the provided |
Thanks. How can I keep container running? Kinda annoying that it rebuilds everything after each debug session. |
I can think of two ways.
|
|
One thing that could be relevant: at attach, the memory-map does not correspond with the ELF. Eventually does, but not right away. Not sure if cross-arch debugging QEMU is something you intend to support. It seems like this could be a nightmare to maintain for all the different setups. |
It is mostly up to LLDB to support such scenarios. I've created the "custom launch" mode specifically to enable debugging various oddball targets, which don't fit into the normal launch/attach cases, but that's where I draw the line. This seems relevant to the failure I am seeing in your case: llvm/llvm-project#49285 |
OS: macOS Monterey 12.5
VSCode version: 1.70.1
CodeLLDB version: 1.7.4
Compiler:
rustc
nightly andgcc
11.1.0Debuggee:
riscv64-unknown-none-elf
on QEMU riscv64-virt 7.0.0Cannot attach to remote GDB server of QEMU. The connection is made successfully, but the extension crashes shortly after. The debugger is left appearing as though it is still trying to attach.
Verbose log
The text was updated successfully, but these errors were encountered: