From: Peter Cheung <mcheung63@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] cpu_memory_rw_debug
Date: Tue, 8 Jan 2013 17:12:59 +0800 [thread overview]
Message-ID: <CABN27mCTfU+LZmfbJ-n53CdLbcFCezfce-7=EKho-POXVicpXw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
I am newbie to qemu source code, please confirm me
this cpu_memory_rw_debug() is reading memory from a physical address?
How to read form a linear/virtual address?
I use the following code to dump out the memory in my debug server.
int noOfBytes;
hwaddr addr;
sscanf(command + 2, "%ld,%d", &addr, &noOfBytes);
printf("addr=%x\n", addr);
printf("noOfBytes=%d\n", noOfBytes);
uint8_t mem_buf[MAX_READ_MEMORY_SIZE + 1];
char buffer[MAX_READ_MEMORY_SIZE * 3];
if (noOfBytes > MAX_READ_MEMORY_SIZE) {
noOfBytes = MAX_READ_MEMORY_SIZE;
}
CPUArchState *cpu = first_cpu; //find_cpu(1);
cpu_single_step(cpu, sstep_flags);
cpu_memory_rw_debug(cpu, addr, mem_buf, noOfBytes, 0);
Thanks
[-- Attachment #2: Type: text/html, Size: 3477 bytes --]
reply other threads:[~2013-01-08 9:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CABN27mCTfU+LZmfbJ-n53CdLbcFCezfce-7=EKho-POXVicpXw@mail.gmail.com' \
--to=mcheung63@gmail.com \
--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).