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
"make gdbserver" doesn't work properly for qemu_x86_long #19734
Comments
@gnuless have you run into this? |
I didn't even know |
I found a workaround:
If I make that set arch call before I connect to the target, it seems to work fine. |
This might be something beyond our control: https://wiki.osdev.org/QEMU_and_GDB_in_long_mode (osdev is such a godsend) |
We munge the ELF64 into an ELF32 before launching QEMU (it won't launch a 64-bit ELF directly), so that's probably why it's confused. |
perhaps have the munge not be in-place, but to a separate artifact that gets passed to the emulator |
Instead, use the QEMU_KERNEL_FILE facility to perform the change in a new file zephyr-qemu.elf. This is what will be sent to the emulator. Fixes an issue where opening zephyr.elf in GDB would treat it as a 32-bit binary instead of what it actually is, forcing the user to override the arch setting. Fixes: zephyrproject-rtos#19734 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Instead, use the QEMU_KERNEL_FILE facility to perform the change in a new file zephyr-qemu.elf. This is what will be sent to the emulator. Fixes an issue where opening zephyr.elf in GDB would treat it as a 32-bit binary instead of what it actually is, forcing the user to override the arch setting. Fixes: #19734 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
When I run "make debugserver", I expect to be able to attach GDB in another terminal to interactively debug the kernel in the emulator. I do this all the time with qemu_x86.
However, with a build for qemu_x86_long, I am getting:
This works as expected for qemu_x86.
Key error message is here:
Not sure how "i386" is getting selected.
Impact:
Prevents interactive debugging for qemu_x86_long.
The text was updated successfully, but these errors were encountered: