tighten architecture-specific path for unwinder

This commit is contained in:
Ryan Fleury
2024-03-25 13:34:43 -07:00
parent e5df25b314
commit 1c3792a3da
2 changed files with 70 additions and 62 deletions
+10 -6
View File
@@ -1437,10 +1437,7 @@ ctrl_unwind_from_thread(Arena *arena, CTRL_EntityStore *store, CTRL_MachineID ma
//- rjf: loop & unwind //- rjf: loop & unwind
UNW_MemView memview = stack_memview; UNW_MemView memview = stack_memview;
if(regs_block_good && stack_memview_good) switch(arch) if(regs_block_good && stack_memview_good)
{
default:{}break;
case Architecture_x64:
{ {
unwind.error = 0; unwind.error = 0;
for(;;) for(;;)
@@ -1488,7 +1485,15 @@ ctrl_unwind_from_thread(Arena *arena, CTRL_EntityStore *store, CTRL_MachineID ma
unwind.count += 1; unwind.count += 1;
// rjf: unwind one step // rjf: unwind one step
UNW_Result unwind_step = unw_pe_x64(binary_data, &dbgi->pe, module_vaddr_range.min, &memview, (UNW_X64_Regs *)regs_block); UNW_Result unwind_step = {0};
switch(arch)
{
default:{unwind_step.dead = 1;}break;
case Architecture_x64:
{
unwind_step = unw_pe_x64(binary_data, &dbgi->pe, module_vaddr_range.min, &memview, (UNW_X64_Regs *)regs_block);
}break;
}
// rjf: cancel on bad step // rjf: cancel on bad step
if(unwind_step.dead != 0) if(unwind_step.dead != 0)
@@ -1505,7 +1510,6 @@ ctrl_unwind_from_thread(Arena *arena, CTRL_EntityStore *store, CTRL_MachineID ma
break; break;
} }
} }
}break;
} }
dbgi_scope_close(scope); dbgi_scope_close(scope);
+4
View File
@@ -15,6 +15,10 @@
//////////////////////////////// ////////////////////////////////
//~ rjf: Frontend/UI Pass Tasks //~ rjf: Frontend/UI Pass Tasks
// //
// [ ] n-row table selection, in watch window & other UIs, multi-selection
// ctrl+C
// [ ] UI_NavActions, OS_Event -> UI_Event (single event stream)
//
// [ ] committing needs to happen when navigating focus away for any reason // [ ] committing needs to happen when navigating focus away for any reason
// [ ] better discoverability for view rules - have better help hover tooltip, // [ ] better discoverability for view rules - have better help hover tooltip,
// info on arguments, and better autocomplete lister // info on arguments, and better autocomplete lister