Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Getting Call Stack info

Getting Call Stack info

Scheduled Pinned Locked Moved C / C++ / MFC
data-structurestutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Ceri
    wrote on last edited by
    #1

    Hi, Does naybody know how to get the call stack programaticly in a function Thanks Ceri

    N F 2 Replies Last reply
    0
    • C Ceri

      Hi, Does naybody know how to get the call stack programaticly in a function Thanks Ceri

      N Offline
      N Offline
      Neville Franks
      wrote on last edited by
      #2

      MFC has a function named AfxDumpStack() or something like that. There are several articles here on CP for crash handling and dumping the stack. Also see John Robbins's BugSlayer articles on MSDN. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com

      C 1 Reply Last reply
      0
      • N Neville Franks

        MFC has a function named AfxDumpStack() or something like that. There are several articles here on CP for crash handling and dumping the stack. Also see John Robbins's BugSlayer articles on MSDN. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com

        C Offline
        C Offline
        Ceri
        wrote on last edited by
        #3

        Hi, Thanks for the reply. This is no good to me for 2 reasons. 1. I am not using MFC 2. If i where then i dont want to output it, i need to actaully do something with the stack frames. I have managed it now by using __asm blocks and using the esp pointer. Not sure i you can help with this question. Do you know how to get the module name or HMODULE that is mapped for a particualt section of memory. e.g. A module is loaded at address 0x01000000. There is a function in that module at address 0x01000123. How can I determine which module that 0x01000123 is inside Many Thanks Ceri

        N 1 Reply Last reply
        0
        • C Ceri

          Hi, Thanks for the reply. This is no good to me for 2 reasons. 1. I am not using MFC 2. If i where then i dont want to output it, i need to actaully do something with the stack frames. I have managed it now by using __asm blocks and using the esp pointer. Not sure i you can help with this question. Do you know how to get the module name or HMODULE that is mapped for a particualt section of memory. e.g. A module is loaded at address 0x01000000. There is a function in that module at address 0x01000123. How can I determine which module that 0x01000123 is inside Many Thanks Ceri

          N Offline
          N Offline
          Neville Franks
          wrote on last edited by
          #4

          There are plenty of good articles around on walking the stack. http://msdn.microsoft.com/msdnmag/issues/02/06/Bugslayer/default.aspx[^] http://www.michaelmoser.org/stk.htm[^] http://msdn.microsoft.com/msdnmag/issues/02/03/Hood/default.aspx[^] http://www.microsoft.com/msj/0497/hood/hood0497.aspx[^] Search MSDN and Google and you'll find lots more. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com

          1 Reply Last reply
          0
          • C Ceri

            Hi, Does naybody know how to get the call stack programaticly in a function Thanks Ceri

            F Offline
            F Offline
            Franz Klein
            wrote on last edited by
            #5

            See : http://www.codeproject.com/tips/stackdumper.asp?target=stack Hope that this helps :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups