Skip to content
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

Segfault on Ctrl+C when QEMU is waiting for GDB #56

Open
lw-img opened this issue May 5, 2015 · 2 comments
Open

Segfault on Ctrl+C when QEMU is waiting for GDB #56

lw-img opened this issue May 5, 2015 · 2 comments

Comments

@lw-img
Copy link

lw-img commented May 5, 2015

When QEMU is waiting for a GDB connection (when parameters "-s -S" are passed) the combination Ctrl+a followed by x has no effect (should exit QEMU). Pressing Ctrl+c exits QEMU, but reports "Segmentation fault". Is a segfault appropriate behavior here? Shouldn't Ctrl+a followed by x work?

@yongbok
Copy link

yongbok commented May 5, 2015

Ctrl+a commands are supported with -nographic option.
In the graphic mode you will need to use Ctrl+Alt commands instead.
Please refer http://wiki.qemu.org/download/qemu-doc.html#pcsys_005fkeys

I couldn't reproduce segfault with Ctrl+c. Would you please describe step-by-step how to and detail of your environment, if you still think that is an issue for you?

@lw-img
Copy link
Author

lw-img commented May 6, 2015

Sorry, I got the parameter wrong - it's "-g 1234", not "-s -S". This happens with executables built using Linux/GNU toolchain and when running in user-mode QEMU.

Build:
[test@centos6-64bit-test hello]$ mips-mti-linux-gnu-gcc -g -O0 -static hello.c -o hello.elf

QEMU:
[test@centos6-64bit-test hello]$ qemu-mips -g 1234 -cpu 74Kf hello.elf -semihosting
^Ax

^CSegmentation fault (core dumped)

I'm running on 64bit CentOS 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants