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 /*
2 Copyright (c) 2010, Ondrej Certik
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 * Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 * Neither the name of the Sandia Corporation nor the names of its contributors
14  may be used to endorse or promote products derived from this software without
15  specific prior written permission.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 
29 #ifndef TEUCHOS_STACKTRACE_HPP
30 #define TEUCHOS_STACKTRACE_HPP
31 
37 #include "Teuchos_ConfigDefs.hpp"
38 
39 
40 #ifdef HAVE_TEUCHOS_STACKTRACE
41 
42 
48 namespace Teuchos {
49 
50 
55 void store_stacktrace();
56 
61 std::string get_stored_stacktrace();
62 
71 std::string get_stacktrace(int impl_stacktrace_depth=0);
72 
77 void show_stacktrace();
78 
83 void print_stack_on_segfault();
84 
85 } // end namespace Teuchos
86 
87 #endif // HAVE_TEUCHOS_STACKTRACE
88 
89 #endif // TEUCHOS_STACKTRACE_HPP
90 
Teuchos header file which uses auto-configuration information to include necessary C++ headers...