Provides information about a xtd::diagnostics::stack_frame, which represents a function call on the call stack for the current thread.
- Inheritance
- xtd::object → xtd::diagnostics::stack_frame
- Namespace
- xtd::diagnostics
- Library
- xtd.core
- Examples
- The following example demonstrates the use of the xtd::diagnostics::stack_frame class to provide the stack frame information for a stack trace.
#include <xtd/xtd>
void method2(int count) {
try {
if (count < 5)
throw;
}
}
void method1() {
try {
method2(4);
throw;
}
}
auto main()->int {
try {
method1();
}
}
- Examples:
- csf.cpp, current_stack_frame.cpp, line_info.cpp, math_assert.cpp, stack_frame.cpp, and stack_trace_simple.cpp.
|
| stack_frame () |
| Initializes a new instance of the xtd::diagnostics::stack_frame class. More...
|
|
| stack_frame (size_t skip_frame) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame. More...
|
|
| stack_frame (bool need_file_info) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class, optionally capturing source information. More...
|
|
| stack_frame (size_t skip_frame, bool need_file_info) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that corresponds to a frame above the current stack frame, optionally capturing source information. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32 line_number) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, and line number. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32 line_number, const xtd::ustring &method_name) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and method name. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32 line_number, const xtd::ustring &method_name, uint32 column_number) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32 line_number, uint32 column_number) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, and column number. More...
|
|
| stack_frame (const xtd::ustring &file_name, uint32 line_number, const xtd::ustring &method_name, uint32 column_number, uint32 offset) |
| Initializes a new instance of the xtd::diagnostics::stack_frame class that contains only the given file name, line number, column number, method name, and offset. More...
|
|
|
bool | equals (const stack_frame &sf) const noexcept override |
|
virtual uint32 | get_file_column_number () const noexcept |
| Gets the column number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. More...
|
|
virtual uint32 | get_file_line_number () const noexcept |
| Gets the line number in the file that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. More...
|
|
virtual const xtd::ustring & | get_file_name () const noexcept |
| Gets the file name that contains the code that is executing. This information is typically extracted from the debugging symbols for the executable. More...
|
|
virtual const xtd::ustring & | get_method () const noexcept |
| Gets the method in which the frame is executing. More...
|
|
virtual uint32 | get_offset () const noexcept |
| Gets the offset from the start of the code for the method that is being executed. More...
|
|
xtd::ustring | to_string () const noexcept override |
| Builds a readable representation of the stack trace. More...
|
|
|
| object ()=default |
| Create a new instance of the ultimate base class object. More...
|
|
bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More...
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More...
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const noexcept |
| Gets the type of the current instance. More...
|
|
virtual bool | equals (const stack_frame &) const noexcept=0 |
| Indicates whether the current object is equal to another object of the same type. More...
|
|
static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More...
|
|
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More...
|
|