Hi folks, I'm busy with a small project and I'm running into problems debugging qemu. I hope this is the right place to get help.
I'm running an application in qemu through the userspace qemu-i386 and attaching to the process with gdb. I have pygdb scripts that then interact with gdb. The issue is that at some point I want to change $eip and redirect instruction flow. I then set $eip to the value I need which gives me the following: Program received signal SIGSEGV, Segmentation fault. 0x46367046 in ?? () (gdb) i r eax 0x4090ca0e 1083230734 ecx 0x0 0 edx 0x407fed20 1082125600 ebx 0x31704630 829441584 esp 0x407ffe40 0x407ffe40 ebp 0x35704634 0x35704634 esi 0x46327046 1177710662 edi 0x70463370 1883648880 eip 0x46367046 0x46367046 eflags 0x202 [ IF ] cs 0x23 35 ss 0x2b 43 ds 0x2b 43 es 0x2b 43 fs 0x0 0 gs 0x33 51 (gdb) set $eip=0x08059924 Cannot access memory at address 0x35704638 (gdb) set $eip=0x08059924 (gdb) x/3i $eip => 0x8059924: pop %ebx 0x8059925: pop %ebp 0x8059926: ret (gdb) si The si command never returns, I have no idea why this is not working. Also no idea why the first set fails.. Any help would be massively appreciated! Kind Regards, J
0x0B03082C.asc
Description: application/pgp-keys