[[package]]
name = "cranelift-bforest"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"byteorder",
"cranelift-bforest",
[[package]]
name = "cranelift-codegen-meta"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
[[package]]
name = "cranelift-codegen-shared"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
[[package]]
name = "cranelift-entity"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
[[package]]
name = "cranelift-frontend"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"cranelift-codegen",
"log",
[[package]]
name = "cranelift-module"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"anyhow",
"cranelift-codegen",
[[package]]
name = "cranelift-native"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
[[package]]
name = "cranelift-object"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"cranelift-codegen",
"cranelift-module",
[[package]]
name = "cranelift-simplejit"
-version = "0.63.0"
-source = "git+https://github.com/bytecodealliance/wasmtime/#51f9ac2150bd880dc7b92952ba92e72ea3ab60b7"
+version = "0.64.0"
+source = "git+https://github.com/bytecodealliance/wasmtime/#00abfcd943fdef8af5c8b2afed09e7ecef512b02"
dependencies = [
"cranelift-codegen",
"cranelift-module",
[[package]]
name = "gimli"
-version = "0.20.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633"
+checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c"
dependencies = [
- "byteorder",
"indexmap",
]
[[package]]
name = "mach"
-version = "0.2.3"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1"
+checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
dependencies = [
"libc",
]
[[package]]
name = "regalloc"
-version = "0.0.24"
+version = "0.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5842bece8a4b1690ffa6d9d959081c1d5d851ee4337a36c0a121fafe8c16add2"
+checksum = "cca5b48c9db66c5ba084e4660b4c0cfe8b551a96074bc04b7c11de86ad0bf1f9"
dependencies = [
"log",
"rustc-hash",
[[package]]
name = "region"
-version = "2.1.2"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856"
+checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0"
dependencies = [
"bitflags",
"libc",
use cranelift_codegen::ValueLocRange;
use gimli::write::{
- self, Address, AttributeValue, DwarfUnit, Expression, LineProgram,
- LineString, Location, LocationList, Range, RangeList, UnitEntryId, Writer,
+ Address, AttributeValue, DwarfUnit, Expression, LineProgram,
+ LineString, Location, LocationList, Range, RangeList, UnitEntryId,
};
use gimli::{Encoding, Format, LineEncoding, RunTimeEndian, X86_64};
let type_entry = self.dwarf.unit.get_mut(type_id);
//type_entry.set(gimli::DW_AT_mutable, AttributeValue::Flag(mutbl == rustc_hir::Mutability::Mut));
- type_entry.set(gimli::DW_AT_type, AttributeValue::ThisUnitEntryRef(pointee));
+ type_entry.set(gimli::DW_AT_type, AttributeValue::UnitRef(pointee));
type_id
}
field_entry.set(gimli::DW_AT_name, AttributeValue::String(field_def.ident.as_str().to_string().into_bytes()));
field_entry.set(gimli::DW_AT_data_member_location, AttributeValue::Udata(field_offset.bytes()));
- field_entry.set(gimli::DW_AT_type, AttributeValue::ThisUnitEntryRef(field_type));
+ field_entry.set(gimli::DW_AT_type, AttributeValue::UnitRef(field_type));
}
type_id
let var_entry = self.debug_context.dwarf.unit.get_mut(var_id);
var_entry.set(gimli::DW_AT_name, AttributeValue::String(name.into_bytes()));
- var_entry.set(gimli::DW_AT_type, AttributeValue::ThisUnitEntryRef(dw_ty));
+ var_entry.set(gimli::DW_AT_type, AttributeValue::UnitRef(dw_ty));
var_id
}
let name = format!("{}{}", base_name, i);
let dw_ty = self.debug_context.dwarf_ty_for_clif_ty(param.value_type);
- let loc = Expression(
- translate_loc(isa, context.func.locations[val], &context.func.stack_slots).unwrap(),
- );
+ let loc = translate_loc(isa, context.func.locations[val], &context.func.stack_slots).unwrap();
let arg_id = self.debug_context.dwarf.unit.add(self.entry_id, gimli::DW_TAG_formal_parameter);
let var_entry = self.debug_context.dwarf.unit.get_mut(arg_id);
var_entry.set(gimli::DW_AT_name, AttributeValue::String(name.into_bytes()));
- var_entry.set(gimli::DW_AT_type, AttributeValue::ThisUnitEntryRef(dw_ty));
+ var_entry.set(gimli::DW_AT_type, AttributeValue::UnitRef(dw_ty));
var_entry.set(gimli::DW_AT_location, AttributeValue::Exprloc(loc));
}
symbol: func_debug_ctx.symbol,
addend: i64::from(value_loc_range.end),
},
- data: Expression(
- translate_loc(isa, value_loc_range.loc, &context.func.stack_slots).unwrap(),
- ),
+ data: translate_loc(isa, value_loc_range.loc, &context.func.stack_slots).unwrap(),
})
.collect(),
);
} else {
// FIXME set value labels for unused locals
- AttributeValue::Exprloc(Expression(vec![]))
+ AttributeValue::Exprloc(Expression::new())
}
}
CPlaceInner::Addr(_, _) => {
// FIXME implement this (used by arguments and returns)
- AttributeValue::Exprloc(Expression(vec![]))
+ AttributeValue::Exprloc(Expression::new())
// For PointerBase::Stack:
- //AttributeValue::Exprloc(Expression(translate_loc(ValueLoc::Stack(*stack_slot), &context.func.stack_slots).unwrap()))
+ //AttributeValue::Exprloc(translate_loc(ValueLoc::Stack(*stack_slot), &context.func.stack_slots).unwrap())
}
}
}
// Adapted from https://github.com/CraneStation/wasmtime/blob/5a1845b4caf7a5dba8eda1fef05213a532ed4259/crates/debug/src/transform/expression.rs#L59-L137
-fn translate_loc(isa: &dyn TargetIsa, loc: ValueLoc, stack_slots: &StackSlots) -> Option<Vec<u8>> {
+fn translate_loc(isa: &dyn TargetIsa, loc: ValueLoc, stack_slots: &StackSlots) -> Option<Expression> {
match loc {
ValueLoc::Reg(reg) => {
let machine_reg = isa.map_dwarf_register(reg).unwrap();
- assert!(machine_reg <= 32); // FIXME
- Some(vec![gimli::constants::DW_OP_reg0.0 + machine_reg as u8])
+ let mut expr = Expression::new();
+ expr.op_reg(gimli::Register(machine_reg));
+ Some(expr)
}
ValueLoc::Stack(ss) => {
if let Some(ss_offset) = stack_slots[ss].offset {
- let endian = gimli::RunTimeEndian::Little;
- let mut writer = write::EndianVec::new(endian);
- writer
- .write_u8(gimli::constants::DW_OP_breg0.0 + X86_64::RBP.0 as u8)
- .expect("bp wr");
- writer.write_sleb128(ss_offset as i64 + 16).expect("ss wr");
- let buf = writer.into_vec();
- return Some(buf);
+ let mut expr = Expression::new();
+ expr.op_breg(X86_64::RBP, ss_offset as i64 + 16);
+ Some(expr)
+ } else {
+ None
}
- None
}
_ => None,
}