From 8a098c5d45bca49e4bb331c7f22dfad59a9b7c4f Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Tue, 9 Jun 2026 15:58:58 -0700 Subject: [PATCH] adjust rules for text view loading; handle non-evaluations / empty evaluations correctly --- src/raddbg/raddbg_core.c | 4 ++++ src/raddbg/raddbg_views.c | 5 +++-- src/text/text.c | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index 7421284d..4eadb5ab 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -12483,6 +12483,10 @@ rd_frame(void) C_ID id = {u128_hash_from_str8(output_label_string)}; C_Key key = c_key_make(d_user_state->output_log_root, id); U128 hash = c_hash_from_key(key, 0); + if(u128_match(hash, u128_zero())) + { + c_submit_data(key, 0, s("")); + } String8 data = c_data_from_hash(access, hash); E_Space space = e_space_make(E_SpaceKind_HashStoreKey); space.u64_0 = key.root.u64[0]; diff --git a/src/raddbg/raddbg_views.c b/src/raddbg/raddbg_views.c index 73411fc2..0baf42f8 100644 --- a/src/raddbg/raddbg_views.c +++ b/src/raddbg/raddbg_views.c @@ -2181,7 +2181,8 @@ RD_VIEW_UI_FUNCTION_DEF(text) ////////////////////////////// //- rjf: code is not missing, but not ready -> equip loading info to this view // - if(!file_is_missing && info.lines_count == 0 && eval.msgs.max_kind == E_MsgKind_Null) + B32 is_loading = (!file_is_missing && info.lines_count == 0 && eval.msgs.max_kind == E_MsgKind_Null && eval.space.kind != E_SpaceKind_Null); + if(is_loading) { rd_store_view_loading_info(1, info.bytes_processed, info.bytes_to_process); } @@ -2189,7 +2190,7 @@ RD_VIEW_UI_FUNCTION_DEF(text) ////////////////////////////// //- rjf: build code contents // - if(!file_is_missing) + if(!file_is_missing && eval.space.kind != E_SpaceKind_Null) { RD_CodeViewBuildFlags flags = RD_CodeViewBuildFlag_All; if(rd_regs()->file_path.size == 0) diff --git a/src/text/text.c b/src/text/text.c index d45addb4..2e414aeb 100644 --- a/src/text/text.c +++ b/src/text/text.c @@ -3024,7 +3024,10 @@ txt_text_info_from_key_lang(Access *access, C_Key key, TXT_LangKind lang, U128 * for(U64 rewind_idx = 0; rewind_idx < C_KEY_HASH_HISTORY_COUNT; rewind_idx += 1) { U128 hash = c_hash_from_key(key, rewind_idx); - result = txt_text_info_from_hash_lang(access, hash, lang); + if(!u128_match(hash, u128_zero())) + { + result = txt_text_info_from_hash_lang(access, hash, lang); + } if(result.lines_count != 0) { if(hash_out)