Pyrogenesis
13997
|
Go to the source code of this file.
Namespaces | |
ERR | |
Introduction | |
Typedefs | |
typedef const u8 *(* | DebugStlIterator )(void *internal, size_t el_size) |
abstraction of all STL iterators used by debug_stl. More... | |
Functions | |
wchar_t * | debug_stl_simplify_name (wchar_t *name) |
reduce complicated STL symbol names to human-readable form. More... | |
Status | debug_stl_get_container_info (const wchar_t *type_name, const u8 *p, size_t size, size_t el_size, size_t *el_count, DebugStlIterator *el_iterator, void *it_mem) |
prepare to enumerate the elements of arbitrarily typed STL containers. More... | |
Variables | |
const Status | ERR::STL_CNT_UNKNOWN = -100500 |
const Status | ERR::STL_CNT_UNSUPPORTED = -100501 |
const Status | ERR::STL_CNT_INVALID = -100502 |
const size_t | DEBUG_STL_MAX_ITERATOR_SIZE = 64 |
no STL iterator is larger than this; see below. More... | |
typedef const u8*(* DebugStlIterator)(void *internal, size_t el_size) |
abstraction of all STL iterators used by debug_stl.
Definition at line 58 of file debug_stl.h.
Status debug_stl_get_container_info | ( | const wchar_t * | type_name, |
const u8 * | p, | ||
size_t | size, | ||
size_t | el_size, | ||
size_t * | el_count, | ||
DebugStlIterator * | el_iterator, | ||
void * | it_mem | ||
) |
prepare to enumerate the elements of arbitrarily typed STL containers.
works by retrieving element count&size via debug information and hiding the container's iterator implementation behind a common interface. a basic sanity check is performed to see if the container memory is valid and appears to be initialized.
type_name | exact type of STL container (see example above) |
p | raw memory holding the container |
size | sizeof(container) |
el_size | sizeof(value_type) |
el_count | out; number of valid elements in container |
el_iterator | out; callback function that acts as an iterator |
it_mem | out; buffer holding the iterator state. must be at least DEBUG_STL_MAX_ITERATOR_SIZE bytes. |
Definition at line 549 of file debug_stl.cpp.
reduce complicated STL symbol names to human-readable form.
algorithm: remove/replace undesired substrings in one pass (fast). example: "std::basic_string\<char, char_traits\<char\>, std::allocator\<char\> \>" => "string".
name | Buffer holding input symbol name; modified in-place. There is no length limit; must be large enough to hold typical STL strings. DEBUG_SYMBOL_CHARS chars is a good measure. |
Definition at line 80 of file debug_stl.cpp.
const size_t DEBUG_STL_MAX_ITERATOR_SIZE = 64 |
no STL iterator is larger than this; see below.
Definition at line 63 of file debug_stl.h.