Remove the debug crate's hard-coded dependency on register ordering

This commit is contained in:
Andrew Brown
2020-03-03 10:06:51 -08:00
parent 3f53bcb740
commit 1d15054310
10 changed files with 133 additions and 82 deletions

View File

@@ -2,6 +2,7 @@ use super::address_transform::AddressTransform;
use super::expression::{CompiledExpression, FunctionFrameInfo};
use anyhow::Error;
use gimli::write;
use wasmtime_environ::isa::TargetIsa;
use wasmtime_environ::wasm::DefinedFuncIndex;
use wasmtime_environ::{ModuleMemoryOffset, ModuleVmctxInfo, ValueLabelsRanges};
@@ -109,11 +110,12 @@ pub(crate) fn append_vmctx_info(
frame_info: Option<&FunctionFrameInfo>,
scope_ranges: &[(u64, u64)],
out_strings: &mut write::StringTable,
isa: &dyn TargetIsa,
) -> Result<(), Error> {
let loc = {
let endian = gimli::RunTimeEndian::Little;
let expr = CompiledExpression::vmctx();
let expr = CompiledExpression::vmctx(isa);
let mut locs = Vec::new();
for (begin, length, data) in
expr.build_with_locals(scope_ranges, addr_tr, frame_info, endian)