Click here to Skip to main content
11,934,809 members (41,735 online)
Rate this:
Please Sign up or sign in to vote.
See more: Windows WinRT Win8

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

#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

    return -1;
    return  0;

Could you help me please?
Thanks for your help
Posted 27-Jun-13 4:32am
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 27 Jun 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100