Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
core
example
show_stack
core/example/show_stack/cxx_main.cpp
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
#include "
Teuchos_stacktrace.hpp
"
11
12
13
void
g
()
14
{
15
#ifdef HAVE_TEUCHOS_STACKTRACE
16
Teuchos::show_stacktrace();
17
#endif
18
}
19
20
21
void
f
()
22
{
23
g
();
24
}
25
26
27
int
main
()
28
{
29
#ifdef HAVE_TEUCHOS_STACKTRACE
30
Teuchos::print_stack_on_segfault();
31
#endif
32
f
();
33
34
// This will segfault:
35
char
*p = NULL; *p = 0;
36
37
return
0;
38
}
f
void f()
Definition:
core/example/show_stack/cxx_main.cpp:21
Teuchos_stacktrace.hpp
Functions for returning stacktrace info (GCC only initially).
g
void g()
Definition:
core/example/show_stack/cxx_main.cpp:13
main
int main(int argc, char *argv[])
Definition:
core/example/CommandLineProcessor/cxx_main.cpp:21
Generated on Mon Nov 11 2024 09:20:28 for Teuchos Package Browser (Single Doxygen Collection) by
1.8.5