mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-02 20:18:12 +00:00
raddbg_markup: stl batteries-included basics
This commit is contained in:
@@ -12,6 +12,10 @@
|
|||||||
# define RADDBG_MARKUP_VSNPRINTF vsnprintf
|
# define RADDBG_MARKUP_VSNPRINTF vsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(RADDBG_MARKUP_STL_TYPE_VIEWS)
|
||||||
|
# define RADDBG_MARKUP_STL_TYPE_VIEWS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ Usage Macros
|
//~ Usage Macros
|
||||||
|
|
||||||
@@ -383,4 +387,22 @@ raddbg_add_or_remove_breakpoint__impl(void *ptr, int set, int size, int r, int w
|
|||||||
#endif // defined(_WIN32)
|
#endif // defined(_WIN32)
|
||||||
#endif // defined(RADDBG_MARKUP_IMPLEMENTATION)
|
#endif // defined(RADDBG_MARKUP_IMPLEMENTATION)
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ Win32 STL Type Views
|
||||||
|
|
||||||
|
#if defined(_WIN32) && defined(RADDBG_MARKUP_IMPLEMENTATION) && RADDBG_MARKUP_STL_TYPE_VIEWS
|
||||||
|
# if defined(_VECTOR_)
|
||||||
|
raddbg_type_view(std::vector<?>, slice(_Mypair._Myval2));
|
||||||
|
# endif
|
||||||
|
# if defined(_MEMORY_)
|
||||||
|
raddbg_type_view(std::unique_ptr<?>, _Mypair._Myval2);
|
||||||
|
# endif
|
||||||
|
# if defined(_STRING_)
|
||||||
|
raddbg_type_view(std::basic_string<?>, _Mypair._Myval2._Myres <= 15 ? _Mypair._Myval2._Bx._Buf : _Mypair._Myval2._Bx._Ptr);
|
||||||
|
# endif
|
||||||
|
# if defined(_STRING_VIEW_)
|
||||||
|
// TODO(rjf)
|
||||||
|
# endif
|
||||||
|
#endif // defined(_WIN32) && defined(RADDBG_MARKUP_IMPLEMENTATION) && RADDBG_MARKUP_STL_TYPE_VIEWS
|
||||||
|
|
||||||
#endif // RADDBG_MARKUP_H
|
#endif // RADDBG_MARKUP_H
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
** stepping, breakpoints, evaluation, cross-module calls.
|
** stepping, breakpoints, evaluation, cross-module calls.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
#define RADDBG_MARKUP_IMPLEMENTATION
|
#define RADDBG_MARKUP_IMPLEMENTATION
|
||||||
#include "lib_raddbg_markup/raddbg_markup.h"
|
#include "lib_raddbg_markup/raddbg_markup.h"
|
||||||
|
|
||||||
@@ -103,13 +106,8 @@ void optimized_struct_parameters_eval_tests(void);
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// NOTE(allen): Type Coverage Eval
|
// NOTE(allen): Type Coverage Eval
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <memory>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
raddbg_type_view(std::vector<?>, slice(_Mypair._Myval2));
|
|
||||||
raddbg_type_view(std::unique_ptr<?>, _Mypair._Myval2);
|
|
||||||
|
|
||||||
struct Basics
|
struct Basics
|
||||||
{
|
{
|
||||||
char a;
|
char a;
|
||||||
@@ -553,6 +551,9 @@ type_coverage_eval_tests(void)
|
|||||||
const int32_t y1 = -10;
|
const int32_t y1 = -10;
|
||||||
const int32_t z1 = x1 + y1;
|
const int32_t z1 = x1 + y1;
|
||||||
|
|
||||||
|
std::string small_cplusplus_string = "smallstr";
|
||||||
|
std::string cplusplus_string = "This is a C++ string!";
|
||||||
|
|
||||||
std::vector<int> int_vector;
|
std::vector<int> int_vector;
|
||||||
int_vector.push_back(1);
|
int_vector.push_back(1);
|
||||||
int_vector.push_back(2);
|
int_vector.push_back(2);
|
||||||
|
|||||||
Reference in New Issue
Block a user