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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Stackwalk in dbghelp/imagehlp (Advanced, debugging)

Stackwalk in dbghelp/imagehlp (Advanced, debugging)

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresquestion
1 Posts 1 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.
  • E Offline
    E Offline
    EiSl
    wrote on last edited by
    #1

    Hello all, When walking through the stack (in my Unhandled Exception Handler) using StackWalk from dbghelp/imagehlp library, this function also provides me the parameters (max. 4) of the function called. Now... Where/how do they get that parameter info? Because I want to make a kind of raw-stack-dump, like provided in DrWatson logs. I need the address pointing to the frame containing the stack contents like (possible) parameters. When doing the 'classic' way of stackwalking (using EBP-register as starting point=frame), than you will find: - Return address (at offset 0, is previous function call) - Program Counter (at offset 8) - Possible parameters passed with function (at offset 16+) But... when you use optimized code, above doesn't work most the time and MSDN suggests using the DBGHELP stuff. Also the other articles in MSDN are not diving into the raw-stack usage. Above is quite complex material, and even MSDN (including technical articals) are not going that deep (except for using the classical way). Thanks in advanced, EiSl

    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