I (thought) this would be a simple one...
Im trying to access memory directly through a varable.
For example:
Code: Select all
int addr = pState->esp;
(ie, get a pointer to the memory location stored in addr)?
I have tried:
Code: Select all
*(int**)&addr
*(int**)addr
(int*)addr
*(int*)addr
I am creating a stack trace for my RSOD. ESP is stored in pState->esp.
I need to derefrence this location to get stack data.
Here is the full source:
Code: Select all
Sys_puts ("Stack trace\n");
for (index=0; index<4; index++) {
int addr = pState->esp;
Sys_printf ("%x %x\n", (int**)&addr, (int**)&addr+1);
addr+=2;
}
Thanks!