All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
stackTrace.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_TF_STACK_TRACE_H
8#define PXR_BASE_TF_STACK_TRACE_H
9
10#include "pxr/pxr.h"
11#include "pxr/base/tf/api.h"
12
13#include <cstdio>
14#include <ctime>
15#include <iosfwd>
16#include <string>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
20class TfCallContext;
21
23TF_API std::string TfGetStackTrace();
24
26TF_API
27void TfPrintStackTrace(FILE *file, const std::string &reason);
28
30TF_API
31void TfPrintStackTrace(std::ostream &out, std::string const &reason);
32
38TF_API
39void TfLogStackTrace(const std::string &reason, bool logtodb=false);
40
50TF_API
51void TfLogCrash(const std::string &reason,
52 const std::string &message, const std::string &additionalInfo,
53 TfCallContext const &context, bool logToDB);
54
56TF_API
57time_t TfGetAppLaunchTime();
58
59PXR_NAMESPACE_CLOSE_SCOPE
60
61#endif