update rust crate
This commit is contained in:
@@ -522,13 +522,11 @@ fn export_data_vars(
|
||||
|
||||
for data_variable in &bv.data_variables() {
|
||||
if let Some(symbol) = data_variable.symbol(bv) {
|
||||
if symbol.sym_type() == SymbolType::External {
|
||||
continue;
|
||||
} else if symbol.sym_type() == SymbolType::Function {
|
||||
continue;
|
||||
} else if symbol.sym_type() == SymbolType::ImportedFunction {
|
||||
continue;
|
||||
} else if symbol.sym_type() == SymbolType::LibraryFunction {
|
||||
if let SymbolType::External
|
||||
| SymbolType::Function
|
||||
| SymbolType::ImportedFunction
|
||||
| SymbolType::LibraryFunction = symbol.sym_type()
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -551,7 +549,7 @@ fn export_data_vars(
|
||||
dwarf.unit.get_mut(var_die_uid).set(
|
||||
gimli::DW_AT_name,
|
||||
AttributeValue::String(
|
||||
format!("data_{:x}", data_variable.address)
|
||||
format!("data_{:x}", data_variable.address())
|
||||
.as_bytes()
|
||||
.to_vec(),
|
||||
),
|
||||
@@ -559,15 +557,15 @@ fn export_data_vars(
|
||||
}
|
||||
|
||||
let mut variable_location = Expression::new();
|
||||
variable_location.op_addr(Address::Constant(data_variable.address));
|
||||
variable_location.op_addr(Address::Constant(data_variable.address()));
|
||||
dwarf.unit.get_mut(var_die_uid).set(
|
||||
gimli::DW_AT_location,
|
||||
AttributeValue::Exprloc(variable_location),
|
||||
);
|
||||
|
||||
if let Some(target_die_uid) = export_type(
|
||||
format!("{}", data_variable.t.contents),
|
||||
data_variable.t.contents.as_ref(),
|
||||
format!("{}", data_variable.t()),
|
||||
data_variable.t(),
|
||||
bv,
|
||||
defined_types,
|
||||
dwarf,
|
||||
@@ -739,7 +737,7 @@ fn export_dwarf(bv: &BinaryView) {
|
||||
} else {
|
||||
BnString::new("Unknown")
|
||||
};
|
||||
let responses = present_form(&arch_name);
|
||||
let responses = present_form(arch_name.as_str());
|
||||
|
||||
let encoding = gimli::Encoding {
|
||||
format: gimli::Format::Dwarf32,
|
||||
|
||||
Reference in New Issue
Block a user