Commit 9f3e8a51 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Use cpu from debuggee's modules rather than debugger's.

parent e8b19532
......@@ -1480,11 +1480,11 @@ PVOID WINAPI SymFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase)
struct process* pcs = process_find_by_handle(hProcess);
struct module* module;
if (!pcs || !dbghelp_current_cpu->find_runtime_function) return NULL;
if (!pcs) return NULL;
module = module_find_by_addr(pcs, AddrBase, DMT_UNKNOWN);
if (!module) return NULL;
if (!module || !module->cpu->find_runtime_function) return NULL;
return dbghelp_current_cpu->find_runtime_function(module, AddrBase);
return module->cpu->find_runtime_function(module, AddrBase);
}
static BOOL native_synchronize_module_list(struct process* pcs)
......
......@@ -1396,7 +1396,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
continue;
}
loc.kind = loc_regrel;
loc.reg = dbghelp_current_cpu->frame_regno;
loc.reg = module->cpu->frame_regno;
loc.offset = n_value;
symt_add_func_local(module, curr_func,
(int)n_value >= 0 ? DataIsParam : DataIsLocal,
......@@ -1476,7 +1476,7 @@ BOOL stabs_parse(struct module* module, ULONG_PTR load_offset,
case N_LSYM:
/* These are local variables */
loc.kind = loc_regrel;
loc.reg = dbghelp_current_cpu->frame_regno;
loc.reg = module->cpu->frame_regno;
loc.offset = n_value;
if (curr_func != NULL) pending_add_var(&pending_block, ptr, DataIsLocal, &loc);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment