[XenAccess-devel] How to get the code section of a process
Status: Beta
Brought to you by:
bdpayne
From: Daniele S. <da...@ya...> - 2006-07-20 16:12:27
|
Is it possible to print a whole section of a process from a domain (for example the code section)? For example (modifying process-data.c): ----------------------------------------- unsigned long vaddr; ..... for(vaddr = taskaddr.start_code; vaddr <= taskaddr.start_end; vaddr++) { memory = xa_access_user_virtual_address(&xai, vaddr, &offset, pid); if (NULL == memory){ perror("failed to map memory"); goto error_exit; } print_hex(memory, XA_PAGE_SIZE); } .... ----------------------------------------- I'm not sure if the addresses found in "xa_linux_taskaddr_t" are page-frame identifiers or virtual addresses. I've looked through the code, and I see that the virtual address (vaddr) is first mapped to the physical address and then to the physical frame and then "xc_map_foreign_range" is called with the parameter size=XC_PAGE_SIZE, and it returns a void * (through mmap) that points to a frame. Is that true? Or should the previous code be something like: vaddr = taskaddr.start_code; vaddr <= taskaddr.start_end; vaddr+=XC_PAGE_SIZE) I hope I've made myself clear :) Thanks! Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com |