Click here to Skip to main content
15,888,205 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,

I am currently using StackWalk64 to get stack on win 8 and winRT(ARM processor).
It is working fine on win 8, but I don't know how to fill-in the variable with the structure STACKFRAME64 in order to make StackWalk64 working on WinRT.

I am using the following piece of code, and I am trying to fill-in the section _M_ARM

C#
#ifdef _M_IX86
    *machineType         = IMAGE_FILE_MACHINE_I386;
    s->AddrPC.Offset     = context.Eip;
    s->AddrPC.Mode       = AddrModeFlat;
    s->AddrStack.Offset  = context.Esp;
    s->AddrStack.Mode    = AddrModeFlat;
    s->AddrFrame.Offset  = context.Ebp;
    s->AddrFrame.Mode    = AddrModeFlat;
#elif  _M_X64
    *machineType         = IMAGE_FILE_MACHINE_AMD64;
    s->AddrPC.Offset     = context.Rip;
    s->AddrPC.Mode       = AddrModeFlat;
    s->AddrStack.Offset  = context.Rsp;
    s->AddrStack.Mode    = AddrModeFlat;
    s->AddrFrame.Offset  = context.Rbp;
    s->AddrFrame.Mode    = AddrModeFlat;
#elif _M_IA64
    *machineType         = IMAGE_FILE_MACHINE_IA64;
    s->AddrPC.Offset     = context.StIIP;
    s->AddrPC.Mode       = AddrModeFlat;
    s->AddrStack.Offset  = context.IntSp;
    s->AddrStack.Mode    = AddrModeFlat;
    s->AddrFrame.Offset  = context.IntSp;
    s->AddrFrame.Mode    = AddrModeFlat;
    s->AddrBStore.Offset = context.RsBSP;
    s->AddrBStore.Mode   = AddrModeFlat;
#elif _M_ARM

#else
    return -1;
#endif
    return  0;



Could you help me please?
Thanks for your help
Posted
Comments
Richard MacCutchan 27-Jun-13 9:54am    
Please don't post the same question in multiple forums; delete one of them.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900