Search Posts

gdb crash, for another debug server

if you are create your own debug server,  gdb will crash, take a look:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffebfff700 (LWP 32202)]
0x000055555577632b in gdb_set_stop_cpu (env=env@entry=0x5555564f6d20) at /root/workspace/qemu-1.5.0/gdbstub.c:2510
2510 gdbserver_state->c_cpu = env;
Missing separate debuginfos, use: debuginfo-install SDL-1.2.15-3.fc18.x86_64 cyrus-sasl-lib-2.1.23-37.fc18.x86_64 glib2-2.34.2-2.fc18.x86_64 glibc-2.16-28.fc18.x86_64 libX11-1.5.0-3.fc18.x86_64 libXau-1.0.6-4.fc18.x86_64 libXcursor-1.1.13-2.fc18.x86_64 libXext-1.3.1-2.fc18.x86_64 libXfixes-5.0-3.fc18.x86_64 libXrandr-1.4.0-1.fc18.x86_64 libXrender-0.9.7-2.fc18.x86_64 libpng-1.5.13-1.fc18.x86_64 libxcb-1.9-1.fc18.x86_64 nss-softokn-freebl-3.14.3-1.fc18.x86_64 pixman-0.28.0-1.fc18.x86_64 zlib-1.2.7-9.fc18.x86_64
(gdb) bt
#0 0x000055555577632b in gdb_set_stop_cpu (env=env@entry=0x5555564f6d20) at /root/workspace/qemu-1.5.0/gdbstub.c:2510
#1 0x000055555575723c in cpu_handle_guest_debug (env=env@entry=0x5555564f6d20) at /root/workspace/qemu-1.5.0/cpus.c:468
#2 0x0000555555758587 in tcg_exec_all () at /root/workspace/qemu-1.5.0/cpus.c:1179
#3 qemu_tcg_cpu_thread_fn (arg=<optimized out>) at /root/workspace/qemu-1.5.0/cpus.c:844
#4 0x00007ffff6bb7d15 in start_thread () from /lib64/
#5 0x00007ffff5e0146d in clone () from /lib64/

Even the gdbserver if not started (because you started your own debug server, so you mustn’t start the gdbserver in qemu), qemu will still call gdb_set_stop_cpu(env); in cpus.c line 468. This will crash qemu.

Leave a Reply

Your email address will not be published. Required fields are marked *