From: Jacques <Jacques@rambo-mes.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu gdb issue
Date: Thu, 15 Mar 2012 18:03:14 +0200 [thread overview]
Message-ID: <4F6212C2.4030104@rambo-mes.net> (raw)
[-- 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 --]
next reply other threads:[~2012-03-15 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 16:03 Jacques [this message]
2012-03-15 17:13 ` [Qemu-devel] qemu gdb issue Mulyadi Santosa
2012-03-16 7:13 ` Jacques
2012-03-16 19:10 ` Mulyadi Santosa
2012-03-16 19:23 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6212C2.4030104@rambo-mes.net \
--to=jacques@rambo-mes.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).