On Thu, Mar 15, 2012 at 07:33:10PM +0900, Daniel Castro wrote:
Kevin, I greatly appreciate your help. Sorry to bother you again.
Could you please check the following sample code, I am sure I am doing something wrong, but I am on the right path:
It would help if you sent actual code samples. The details are important.
I have: struct xendrive_s * xd = conteiner_of(op->drive_g,...)
GET_GLOBAL(op->drive_g) -- as that is a memory access.
struct blk_info * bi = GLOBALFLAT2GLOBAL($(GET_GLOBALFLAT(xd)->info);
I don't know what $ does.
To test I do: dprintf(1,"DEBUG test xendrive %p and an int %d.\n",GET_GLOBALFLAT(xd),GET_GLOBALFLAT(GET_GLOBALFLAT(bi)->buffer_gref));
Neither "bi" nor "xd" is a non-stack memory access so they shouldn't be wrapped. "bi->buffer_gref" is a memory access. So it should look like dprintf("...", xd, GET_GLOBALFLAT(bi->buffer_gref)). (This is assuming the pointer in buffer_gref was obtained via malloc_fseg.)
-Kevin