* [Qemu-devel] cpu_memory_rw_debug
@ 2013-01-08 9:12 Peter Cheung
0 siblings, 0 replies; only message in thread
From: Peter Cheung @ 2013-01-08 9:12 UTC (permalink / raw)
To: qemu-devel
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-01-08 9:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 9:12 [Qemu-devel] cpu_memory_rw_debug Peter Cheung
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).