Skip to content

A simple cross-platform C++11 library for generating stack traces.

License

Notifications You must be signed in to change notification settings

artisdom/withershins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

withershins

Build Status Build status License

A simple cross-platform C++11 library for generating stack traces.

Supported Platforms

This library is currently supported on Windows, OSX, and Linux, and requires a compiler that is fairly compliant with C++11 - the library has been compiled under gcc 4.8, clang 3.4, and MSVC 2013 (older versions of those compilers may work, but have not yet been tested).

Dependencies

  • Linux: libbfd
    • For Ubuntu and similar distributions, this can be installed through apt-get install binutils-dev libiberty-dev.
  • Windows: DbgHelp.dll (included with Windows)

Example

#include <withershins.hpp>

void foo()
{
  std::vector<withershins::frame> frames = withershins::trace();
  assert(frames[0].function_name() == "foo");
  assert(frames[1].function_name() == "main");
}

int main(int argc, char *argv[])
{
  foo();
  return 0;
}

About

A simple cross-platform C++11 library for generating stack traces.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages