2013年8月28日星期三

How to read mm_struct in start_code to end_code snippet content

As stated , I have gained a process descriptor task_struct and memory descriptor mm_struct;
My goal is the descriptor from memory , the code segment, data segment address points such as the contents get out ;

For example, I received a snippet of a process starting address : 0x08048000, which is a virtual address , right ? Is not it what mechanisms through pages into a physical address first ?

I saw address translation, wound me confused ;

pursuing big God who gave a code reference , how to get the contents of the address pointed out .


------ Solution ------------------------------------ --------
upper address conversion procedures do not control what 's right, onlookers
------ For reference only ---------------- -----------------------
ah ah , how no one . . Seeking small partners onlookers yourselves
------ For reference only ---------------------------------------

that if not conversion , I want to get directly to the contents of the virtual address points , how to get it ?
I stupid to try to copy the address of a pointer type, and then just forget several offset test , would like to use print to print the contents of the pointer , the results can not get out what
------ For reference only ---------------------------------------
engage in a long time to understand their practice . . I got a 32- bit address , which is the content of the ELF file itself is two binary files, I thought it was a text yet. . A variety of characters you want to print and then play out garbled, in fact printed as a hexadecimal value on OK. .

没有评论:

发表评论