Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44109

Provide access to raw backtraces and object offsets

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Dev Tools 2019-11-04

      mongo/util/stacktrace.h provides a function printStackTrace().

      I would like an accompanying function to provide the raw backtrace via either:

      std::vector<uintptr_t> getStackTrace()

      or:

      template<typename F> requires Invokable<F, uintptr_t> void iterateStackTrace(F functor)

      I would also like a function to convert a uintptr_t instruction address into a tuple object of dynamic object name and file offset:

      std::pair<std::string, uintptr_t> getDynamicObjectOffset(uintptr_t instructionAddress)

      Actual container or functor types are relatively immaterial to me so long as they do not incur overhead.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: