Go to the source code of this file.
|
typedef const u8 *(* | DebugStlIterator) (void *internal, size_t el_size) |
| abstraction of all STL iterators used by debug_stl. More...
|
|
◆ DebugStlIterator
typedef const u8 *(* DebugStlIterator) (void *internal, size_t el_size) |
abstraction of all STL iterators used by debug_stl.
◆ debug_stl_get_container_info()
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.
- Parameters
-
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. |
- Returns
- Status (ERR::STL_*)
◆ debug_stl_simplify_name()
wchar_t * debug_stl_simplify_name |
( |
wchar_t * |
name | ) |
|
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".
- Parameters
-
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. |
- Returns
- name for convenience.
◆ DEBUG_STL_MAX_ITERATOR_SIZE
const size_t DEBUG_STL_MAX_ITERATOR_SIZE = 64 |
no STL iterator is larger than this; see below.