[Dwarf-discuss] DW_OP_bregx access?

Jun Koi junkoi2004
Sat Oct 7 06:26:15 GMT 2006


On 10/7/06, Michael Eager <eager at eagercon.com> wrote:
> 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.
>

Great to hear that :-)

> 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?

Yes, I did, but it seems nothing wrong to me. I will try to
investigate again, and post what I found for further discussions.

Many thanks, Micheal.
Jun





More information about the Dwarf-discuss mailing list