[stacktrace.general] # 19 Diagnostics library [[diagnostics]](./#diagnostics) ## 19.6 Stacktrace [[stacktrace]](stacktrace#general) ### 19.6.1 General [stacktrace.general] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1651) Subclause [[stacktrace]](stacktrace "19.6 Stacktrace") describes components that C++ programs may use to store the stacktrace of the current thread of execution and query information about the stored stacktrace at runtime[.](#1.sentence-1) [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1657) The [*invocation sequence*](#def:invocation_sequence "19.6.1 General [stacktrace.general]") of the current evaluation x0 in the current thread of execution is a sequence (x0,…,xn) of evaluations such that, for i ≥ 0,xi is within the function invocation xi+1 ([[intro.execution]](intro.execution "6.10.1 Sequential execution"))[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L1663) A [*stacktrace*](#def:stacktrace "19.6.1 General [stacktrace.general]") is an approximate representation of an invocation sequence and consists of stacktrace entries[.](#3.sentence-1) A [*stacktrace entry*](#def:stacktrace_entry "19.6.1 General [stacktrace.general]") represents an evaluation in a stacktrace[.](#3.sentence-2)