Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3956822
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:24:46+00:00 2026-05-20T02:24:46+00:00

I want to implement an analog of backtrace utility under windows in order to

  • 0

I want to implement an analog of backtrace utility under windows in order to add this information to exception for example.

I need to capture return addresses and then translate it into symbols names.

I’m aware of StackWalk64 and of StackWalker project but unfortunately it has several important drawbacks:

  • It is known to be very slow (the StackWalk64) and I don’t want to waste much time for collecting the trace the basically can be done as fast as walking on linked list.
  • The function StackWalk64 is known to be not thread safe.

I want to support only x86 and possible x86_64 architectures

Basic idea I have is following:

  1. Run on stack using esp/ebp registers similarly to what GCC’s __builtin_return_address(x)/__builtin_frame_address(x) doe till I reach the bottom of the stack (this is what glibc does).
  2. Translate addresses to symbols
  3. Demangle them.

Problems/Questions:

  1. How do I know that I reach the to of the stack? For example glibc implementation has __libc_stack_end so it is easy to find where to stop. Is there any analog of such thing under Windows? How can I get stack bottom address?
  2. What are the analogs of dladdr functionality. Now I know that unlike ELF platform that keeps most of symbol names, PE format does not. So it should read somehow the debug information. Any ideas?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:24:47+00:00Added an answer on May 20, 2026 at 2:24 am
    • Capturing Stack Trace: RtlCaptureStackBackTrace
    • Getting Symbols: Using DBG Help library (MSVC only). Key functions:

      // Initialization
      hProcess = GetCurrentProcess()
      SymSetOptions(SYMOPT_DEFERRED_LOADS)
      SymInitialize(hProcess, NULL, TRUE)
      // Fetching symbol
      SymFromAddr(...)
      

      Implementation can be found there

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need add paging to panel, which populated with dynamically-created controls. I want implement
I want to implement this example http://api.geoext.org/1.1/examples/feature-grid.html made of geoext and openlayers, that feature
i starter in jqgrid, i want implement inline edit in jqgrid i have this
given this class definition: public class Frame { IFrameStream CapturedFrom; } I want implement
I want to implement a job scheduler in my windows azure application. My aim
I want to implement login using facebook in my windows phone 7.1 application When
i have question for example i want to implement binary tree with array i
I want to implement the Konami code on my webpage. I came across this
I have WSDL and XSD files and want implement a webservice based on this
I want to implement a message system using mysql for storage. This is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.