mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-01 03:40:02 +00:00
eliminate more old view settings code, simplify new, also clean up the targetless launch flow even more - if we only have one target, but it's inactive, and the user is trying to launch, then it doesn't hurt to just act as if that target was selected, then select it for them...
This commit is contained in:
@@ -1219,52 +1219,6 @@ e_base_offset_from_eval(E_Eval eval)
|
||||
return eval.value.u64;
|
||||
}
|
||||
|
||||
internal Rng1U64
|
||||
e_range_from_eval(E_Eval eval)
|
||||
{
|
||||
U64 size = 0;
|
||||
E_Type *type = e_type_from_key__cached(eval.irtree.type_key);
|
||||
if(type->kind == E_TypeKind_Lens)
|
||||
{
|
||||
for EachIndex(idx, type->count)
|
||||
{
|
||||
E_Expr *arg = type->args[idx];
|
||||
if(arg->kind == E_ExprKind_Define && str8_match(arg->first->string, str8_lit("size"), 0))
|
||||
{
|
||||
size = e_value_from_expr(arg->first->next).u64;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
E_TypeKey type_key = e_type_key_unwrap(eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative);
|
||||
E_TypeKind type_kind = e_type_kind_from_key(type_key);
|
||||
E_TypeKey direct_type_key = e_type_key_unwrap(type_key, E_TypeUnwrapFlag_All);
|
||||
E_TypeKind direct_type_kind = e_type_kind_from_key(direct_type_key);
|
||||
if(size == 0 && e_type_kind_is_pointer_or_ref(type_kind) && (direct_type_kind == E_TypeKind_Struct ||
|
||||
direct_type_kind == E_TypeKind_Union ||
|
||||
direct_type_kind == E_TypeKind_Class ||
|
||||
direct_type_kind == E_TypeKind_Array))
|
||||
{
|
||||
size = e_type_byte_size_from_key(direct_type_key);
|
||||
}
|
||||
if(size == 0 && eval.irtree.mode == E_Mode_Offset && (type_kind == E_TypeKind_Struct ||
|
||||
type_kind == E_TypeKind_Union ||
|
||||
type_kind == E_TypeKind_Class ||
|
||||
type_kind == E_TypeKind_Array))
|
||||
{
|
||||
size = e_type_byte_size_from_key(type_key);
|
||||
}
|
||||
if(size == 0)
|
||||
{
|
||||
size = KB(16);
|
||||
}
|
||||
Rng1U64 result = {0};
|
||||
result.min = e_base_offset_from_eval(eval);
|
||||
result.max = result.min + size;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Debug Functions
|
||||
|
||||
|
||||
@@ -1179,7 +1179,6 @@ internal E_Key e_key_wrapf(E_Key key, char *fmt, ...);
|
||||
//~ rjf: Eval Info Extraction
|
||||
|
||||
internal U64 e_base_offset_from_eval(E_Eval eval);
|
||||
internal Rng1U64 e_range_from_eval(E_Eval eval);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Debug Functions
|
||||
|
||||
Reference in New Issue
Block a user