qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu gdb issue
@ 2012-03-15 16:03 Jacques
  2012-03-15 17:13 ` Mulyadi Santosa
  0 siblings, 1 reply; 5+ messages in thread
From: Jacques @ 2012-03-15 16:03 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

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

[-- Attachment #2: 0x0B03082C.asc --]
[-- Type: application/pgp-keys, Size: 3109 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-16 19:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 16:03 [Qemu-devel] qemu gdb issue Jacques
2012-03-15 17:13 ` Mulyadi Santosa
2012-03-16  7:13   ` Jacques
2012-03-16 19:10     ` Mulyadi Santosa
2012-03-16 19:23       ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).