adjust disasm window limits; too often hitting non-read-only memory

This commit is contained in:
Ryan Fleury
2024-05-23 11:34:23 -07:00
parent bc40d1c0b0
commit 905d04ab0b
2 changed files with 11 additions and 4 deletions
+9 -2
View File
@@ -24,8 +24,7 @@ dasm_params_match(DASM_Params *a, DASM_Params *b)
a->style_flags == b->style_flags &&
a->syntax == b->syntax &&
a->base_vaddr == b->base_vaddr &&
str8_match(a->dbgi_key.path, b->dbgi_key.path, 0) &&
a->dbgi_key.min_timestamp == b->dbgi_key.min_timestamp);
di_key_match(&a->dbgi_key, &b->dbgi_key));
return result;
}
@@ -237,6 +236,14 @@ dasm_info_from_hash_params(DASM_Scope *scope, U128 hash, DASM_Params *params)
}
if(node == 0)
{
log_infof("[dasm] cache miss, creating node...\n");
log_infof(" hash: [0x%I64x 0x%I64x]\n", hash.u64[0], hash.u64[1]);
log_infof(" vaddr: 0x%I64x\n", params->vaddr);
log_infof(" arch: %S\n", string_from_architecture(params->arch));
log_infof(" style_flags: 0x%x\n", params->style_flags);
log_infof(" syntax: %i\n", params->syntax);
log_infof(" base_vaddr: 0x%I64x\n", params->base_vaddr);
log_infof(" dbgi_key: [%S 0x%I64x]\n", params->dbgi_key.path, params->dbgi_key.min_timestamp);
node = stripe->free_node;
if(node)
{
+2 -2
View File
@@ -6820,10 +6820,10 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly)
//
DF_Entity *process = df_entity_from_handle(dv->process);
Architecture arch = df_architecture_from_entity(process);
U64 dasm_base_vaddr = AlignDownPow2(dv->base_vaddr, KB(64));
U64 dasm_base_vaddr = AlignDownPow2(dv->base_vaddr, KB(16));
DF_Entity *dasm_module = df_module_from_process_vaddr(process, dasm_base_vaddr);
DI_Key dasm_dbgi_key = df_dbgi_key_from_module(dasm_module);
Rng1U64 dasm_vaddr_range = r1u64(dasm_base_vaddr, dasm_base_vaddr+KB(64));
Rng1U64 dasm_vaddr_range = r1u64(dasm_base_vaddr, dasm_base_vaddr+KB(16));
U128 dasm_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, dasm_vaddr_range, 0);
U128 dasm_data_hash = {0};
DASM_Params dasm_params = {0};