fix incorrect registers view with new eval viz expansion system

This commit is contained in:
Ryan Fleury
2024-10-10 14:06:52 -07:00
parent 578d8d64a0
commit 51b8dbaab0
2 changed files with 31 additions and 13 deletions
+20 -4
View File
@@ -8554,18 +8554,34 @@ EV_VIEW_RULE_EXPR_EXPAND_RANGE_INFO_FUNCTION_DEF(locals)
EV_VIEW_RULE_EXPR_EXPAND_INFO_FUNCTION_DEF(registers)
{
Temp scratch = scratch_begin(&arena, 1);
CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread);
Arch arch = thread->arch;
U64 reg_count = regs_reg_code_count_from_arch(arch);
U64 alias_count = regs_alias_code_count_from_arch(arch);
String8 *reg_strings = regs_reg_code_string_table_from_arch(arch);
String8 *alias_strings = regs_alias_code_string_table_from_arch(arch);
String8List exprs_list = {0};
for(U64 idx = 1; idx < reg_count; idx += 1)
{
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, reg_strings[idx]);
if(matches.count == matches.needle_part_count)
{
str8_list_push(scratch.arena, &exprs_list, reg_strings[idx]);
}
}
for(U64 idx = 1; idx < alias_count; idx += 1)
{
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, alias_strings[idx]);
if(matches.count == matches.needle_part_count)
{
str8_list_push(scratch.arena, &exprs_list, alias_strings[idx]);
}
}
String8Array *accel = push_array(arena, String8Array, 1);
accel->count = reg_count + alias_count;
accel->v = push_array(arena, String8, accel->count);
MemoryCopy(accel->v + 0, reg_strings, reg_count);
MemoryCopy(accel->v + reg_count, alias_strings, alias_count);
*accel = str8_array_from_list(arena, &exprs_list);
EV_ExpandInfo info = {accel, accel->count};
scratch_end(scratch);
return info;
}
+11 -9
View File
@@ -8,26 +8,17 @@
// [ ] entity listers - kill-specific-process, etc.
// [ ] new universal ctx menu, hover, tooltips systems
// [ ] fix memory view
// [ ] meta eval system
// [ ] file path map editor
// [ ] file path map building
// [ ] `switch` replacement (recent files history)
// [ ] resolving name as file or #include
// [ ] new `restart processes` path
// [ ] remainder of @msgs
//
// [ ] post-@msgs TODOs:
// [ ] ensure "prefer_disasm" is calculated correctly - disassembly-focused
// stepping
//
// [ ] ensure the following issues are resolved with this new pass:
// [ ] global evaluation across DLL boundaries
// [ ] mohit-reported callstack-frame-selection bug (with inlines)
// [ ] empty user file causing failure to launch
// [ ] decay arrays to pointers in pointer/value comparison
// [ ] file overrides -> always pick most specific one! found with conflicting
// overrides, e.g. C:/devel/ -> D:/devel/, but also C:/devel/foo ->
// C:/devel/bar, etc.
// [ ] visualize all breakpoints everywhere - source view should show up in
// disasm, disasm should show up in source view, function should show up in
// both, etc.
@@ -37,6 +28,8 @@
// that's because there was a function breakpoint there.
// [ ] debugger readme pass
//
//
//
// [x] codebase readme pass
// [x] target editor
// [x] modules view
@@ -55,6 +48,10 @@
// [x] ensure ctrl+click
// [x] scheduler view
// [x] eval committing
// [x] fix registers
// [x] file overrides -> always pick most specific one! found with conflicting
// overrides, e.g. C:/devel/ -> D:/devel/, but also C:/devel/foo ->
// C:/devel/bar, etc.
////////////////////////////////
//~ rjf: post-0.9.12 TODO notes
@@ -523,6 +520,11 @@
// all of the stateful windows/panel/view/watch mechanisms, and then
// the frontend pure-functionally queries stuff like os/r handles
// on-demand, and then prunes them, immediate-mode cache style.
// [x] ensure "prefer_disasm" is calculated correctly - disassembly-focused
// stepping
// [x] file path map editor
// [x] file path map building
// [x] meta eval system
////////////////////////////////
//~ rjf: Build Options