diff --git a/src/mule/mule_main.cpp b/src/mule/mule_main.cpp index 17fb4d12..64a47e14 100644 --- a/src/mule/mule_main.cpp +++ b/src/mule/mule_main.cpp @@ -431,6 +431,7 @@ type_coverage_eval_tests(void) char data[4]; }; SomeDataStructured *some_data = (SomeDataStructured *)&some_data_with_a_string[0]; + char *string_ptr = &string[0]; const char *const_string = "Hello, World!"; const char const_string_array[] = "Hello, World!"; diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index 6eda13da..79b925fe 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -1237,10 +1237,18 @@ rd_commit_eval_value_string(E_Eval dst_eval, String8 string) commit_data.size = Min(commit_data.size, e_type_byte_size_from_key(type_key)); } + //- rjf: determine if commit string is quoted + B32 is_quoted = 0; + if(string.size >= 1 && string.str[0] == '"') + { + string = str8_skip(string, 1); + is_quoted = 1; + } + //- rjf: pointer or array to characters/integers? -> try to treat // new value string as textual data if(!got_commit_data && - ((type_kind == E_TypeKind_Ptr || type_kind == E_TypeKind_Array) && + (((is_quoted && type_kind == E_TypeKind_Ptr) || type_kind == E_TypeKind_Array) && (direct_type_kind == E_TypeKind_Char8 || direct_type_kind == E_TypeKind_Char16 || direct_type_kind == E_TypeKind_Char32 || @@ -1250,12 +1258,6 @@ rd_commit_eval_value_string(E_Eval dst_eval, String8 string) e_type_kind_is_integer(direct_type_kind)))) { got_commit_data = 1; - B32 is_quoted = 0; - if(string.size >= 1 && string.str[0] == '"') - { - string = str8_skip(string, 1); - is_quoted = 1; - } if(string.size >= 1 && string.str[string.size-1] == '"') { string = str8_chop(string, 1); @@ -1306,9 +1308,9 @@ rd_commit_eval_value_string(E_Eval dst_eval, String8 string) src_eval_value.irtree.mode == E_Mode_Value) { got_commit_data = 1; - commit_data = push_str8_copy(scratch.arena, str8_struct(&src_eval.value)); - commit_data.size = Min(commit_data.size, e_type_byte_size_from_key(src_eval.irtree.type_key)); - commit_data.size = Min(commit_data.size, e_type_byte_size_from_key(type_key)); + commit_data = str8_copy(scratch.arena, str8_struct(&src_eval.value)); + commit_data.size = Max(commit_data.size, e_type_byte_size_from_key(src_eval.irtree.type_key)); + commit_data.size = Max(commit_data.size, e_type_byte_size_from_key(type_key)); } } } diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index 2373b425..9d252378 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -5,21 +5,24 @@ //~ rjf: post-0.9.20 TODO notes // //- fabian complaints / reports -// [x] `foo, x` needs to correctly match `hex(foo)`, e.g. in application to expansions // [ ] broadly, need to complete memory view & fix issues // [ ] dumb panel click-through thing // [ ] correct type interpretations; togglable interpretations // [ ] make address editable; specialized version of the cursor address editor in tab right-click menu -// [x] eval: pointer casts of register space should promote to process space // [ ] simplified default layout -// [ ] signify empty watch window "expression" slot more as a text field? -// [ ] ambiguous parsing cases - need to re-introduce identifier resolution into eval parse. (foo *)&bar -// [ ] more control over string visualization; specifically, when *not* to do it, even when using e.g. char *s -// [ ] broadly, view discoverability / docs -// [ ] memory view deserves larger spot, in default layout -// [ ] sign bits should not display on unsigned integers? +// [ ] memory view deserves larger spot, in default layout // [ ] fix for-loop stepping oddities, likely single-line for-loop stepping +// [x] `foo, x` needs to correctly match `hex(foo)`, e.g. in application to expansions +// [x] eval: pointer casts of register space should promote to process space +// [x] more control over string visualization; specifically, when *not* to do it, even when using e.g. char *s +// [x] sign bits should not display on unsigned integers? +// [ ] ambiguous parsing cases - need to re-introduce identifier resolution into eval parse. (foo *)&bar +// [ ] broadly, view discoverability / docs // [ ] source/disasm ctx menu should include options for e.g. "go to selected thread" +// [ ] signify empty watch window "expression" slot more as a text field? +// +//- jeff viz notes +// [ ] single-line viz for pointers w/ bad (unmapped) addresses // //- namespace/locations/variables RDI pass // [ ] RDI_Local, RDI_GlobalVariable, RDI_ThreadVariable -> RDI_Variable