mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00:00
more mule_module coverage; bugfix edge-case memory view range calculation causing flipped min/max
This commit is contained in:
@@ -7316,6 +7316,10 @@ DF_VIEW_UI_FUNCTION_DEF(Memory)
|
|||||||
viz_range_rows.max = clamp_1s64(scroll_idx_rng, viz_range_rows.max);
|
viz_range_rows.max = clamp_1s64(scroll_idx_rng, viz_range_rows.max);
|
||||||
viz_range_bytes.min = viz_range_rows.min*mv->num_columns;
|
viz_range_bytes.min = viz_range_rows.min*mv->num_columns;
|
||||||
viz_range_bytes.max = (viz_range_rows.max+1)*mv->num_columns+1;
|
viz_range_bytes.max = (viz_range_rows.max+1)*mv->num_columns+1;
|
||||||
|
if(viz_range_bytes.min > viz_range_bytes.max)
|
||||||
|
{
|
||||||
|
Swap(U64, viz_range_bytes.min, viz_range_bytes.max);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
|
|||||||
@@ -371,6 +371,9 @@ type_coverage_eval_tests(void){
|
|||||||
stks *stks_first = &stks_test[0];
|
stks *stks_first = &stks_test[0];
|
||||||
stks *stks_ptr = stks_first + 8;
|
stks *stks_ptr = stks_first + 8;
|
||||||
|
|
||||||
|
TestFunction *function = mule_get_module_function("dll_type_eval_tests");
|
||||||
|
function();
|
||||||
|
|
||||||
int x = (int)(Anonymous_D);
|
int x = (int)(Anonymous_D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+19
-15
@@ -1,38 +1,42 @@
|
|||||||
// Copyright (c) 2024 Epic Games Tools
|
// Copyright (c) 2024 Epic Games Tools
|
||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
/*
|
|
||||||
** Program to run in debugger organized to provide tests for
|
|
||||||
** stepping, breakpoints, evaluation, cross-module calls.
|
|
||||||
*/
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
// NOTE(allen): Setup
|
|
||||||
|
|
||||||
|
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
#define export_function extern "C" __declspec(dllexport)
|
#define export_function extern "C" __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define export_function extern "C"
|
#define export_function extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
// NOTE(allen): TLS Eval
|
|
||||||
|
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
# define thread_var __declspec(thread)
|
# define thread_var __declspec(thread)
|
||||||
#else
|
#else
|
||||||
# define thread_var __thread
|
# define thread_var __thread
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef struct Basics Basics;
|
||||||
|
struct Basics
|
||||||
|
{
|
||||||
|
int a;
|
||||||
|
int b;
|
||||||
|
int c;
|
||||||
|
int d;
|
||||||
|
};
|
||||||
|
|
||||||
thread_var float tls_a = 1.015625f;
|
thread_var float tls_a = 1.015625f;
|
||||||
thread_var int tls_b = -100;
|
thread_var int tls_b = -100;
|
||||||
|
|
||||||
export_function void
|
export_function void
|
||||||
dll_tls_eval_test(void){
|
dll_tls_eval_test(void)
|
||||||
|
{
|
||||||
tls_a *= 1.5f;
|
tls_a *= 1.5f;
|
||||||
tls_b *= -2;
|
tls_b *= -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export_function void
|
||||||
|
dll_type_eval_tests(void)
|
||||||
|
{
|
||||||
|
Basics basics1 = {1, 2, 3, 4};
|
||||||
|
Basics basics2 = {4, 5, 6, 7};
|
||||||
|
int x = 0;
|
||||||
|
(void)x;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user