printStackTrace.h 986 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2006 Michael Eddington
  3. * Copyright (c) 2001 Jani Kajala
  4. *
  5. * Permission to use, copy, modify, distribute and sell this
  6. * software and its documentation for any purpose is hereby
  7. * granted without fee, provided that the above copyright notice
  8. * appear in all copies and that both that copyright notice and
  9. * this permission notice appear in supporting documentation.
  10. * Jani Kajala makes no representations about the suitability
  11. * of this software for any purpose. It is provided "as is"
  12. * without express or implied warranty.
  13. */
  14. #ifndef _PRINTSTACKTRACE_H
  15. #define _PRINTSTACKTRACE_H
  16. /*
  17. * Prints formatted call stack to the user defined buffer,
  18. * always terminating the buffer with 0.
  19. * Uses stack frame to find out the caller function address and
  20. * the map file to find out the function name.
  21. */
  22. extern "C" void printStackTrace( char* buffer, int bufferSize, char* mapFilename );
  23. extern "C" void StackTraceCleanup();
  24. #endif /* _PRINTSTACKTRACE_H */