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