Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Teuchos_stacktrace.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Teuchos: Common Tools Package
4 //
5 // Copyright 2004 NTESS and the Teuchos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 /*
11 Copyright (c) 2010, Ondrej Certik
12 All rights reserved.
13 
14 Redistribution and use in source and binary forms, with or without
15 modification, are permitted provided that the following conditions are met:
16 
17 * Redistributions of source code must retain the above copyright notice, this
18  list of conditions and the following disclaimer.
19 * Redistributions in binary form must reproduce the above copyright notice,
20  this list of conditions and the following disclaimer in the documentation
21  and/or other materials provided with the distribution.
22 * Neither the name of the Sandia Corporation nor the names of its contributors
23  may be used to endorse or promote products derived from this software without
24  specific prior written permission.
25 
26 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
27 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37 
38 #ifndef TEUCHOS_STACKTRACE_HPP
39 #define TEUCHOS_STACKTRACE_HPP
40 
46 #include "Teuchos_ConfigDefs.hpp"
47 
48 
49 #ifdef HAVE_TEUCHOS_STACKTRACE
50 
51 
57 namespace Teuchos {
58 
59 
64 void store_stacktrace();
65 
70 std::string get_stored_stacktrace();
71 
80 std::string get_stacktrace(int impl_stacktrace_depth=0);
81 
86 void show_stacktrace();
87 
92 void print_stack_on_segfault();
93 
94 } // end namespace Teuchos
95 
96 #endif // HAVE_TEUCHOS_STACKTRACE
97 
98 #endif // TEUCHOS_STACKTRACE_HPP
99 
Teuchos header file which uses auto-configuration information to include necessary C++ headers...