[Dwarf-discuss] DW_OP_bregx access?

Michael Eager eager
Fri Oct 6 19:47:46 GMT 2006


Jun Koi wrote:

> Then I tried to copy the data from "buf" to other area, ie. something like this
> 
> memcpy(myarray, (char *)(EBP+12), number);
> 
> But to my surprise, everytime I did this, I got the same data in
> "myarray". In fact the data must be different, because each time I
> feeded the read syscall (ie. feed vfs_read()) different data.
> 
> I am stuck here. Probably I interpreted the way to use breg5+12 in a wrong way?

Your interpretation of DWARF looks correct.

There's far too little information here about what you are
doing to be able to offer any help.  There are any number of
reasons why you would get the same data in myarray, most of
which would seem to be bugs in your code.

Is the value you compute for of EBP correct?  Are you evaluating
it each time you enter the routine?  What does printk in the
routine say the value of buf is?  Does printk of the data match
the data you copy?

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077





More information about the Dwarf-discuss mailing list