mirror of
https://github.com/lief-project/LIEF.git
synced 2026-10-11 22:09:53 +00:00
binaryninja: prefer stack allocation
This commit is contained in:
@@ -101,13 +101,11 @@ dw::Function* FunctionEngine::add_function(BN::Function& func) {
|
||||
std::unique_ptr<dw::Variable> dw_var =
|
||||
dw_func->create_stack_variable(info.name);
|
||||
|
||||
auto location = std::make_unique<LIEF::dwarf::FrameBaseLoc>(addr);
|
||||
|
||||
if (auto var_type = info.type; api_compat::as_bool(var_type)) {
|
||||
dw::Type& dw_type = types_.add_type(api_compat::get_type(var_type));
|
||||
dw_var->set_type(dw_type);
|
||||
}
|
||||
dw_var->set_location(*location);
|
||||
dw_var->set_location(LIEF::dwarf::FrameBaseLoc(addr));
|
||||
}
|
||||
}
|
||||
std::vector<uint64_t> commented_addresses = func.GetCommentedAddresses();
|
||||
|
||||
@@ -52,11 +52,8 @@ dw::Variable* VarEngine::add_variable(const BN::DataVariable& var) {
|
||||
|
||||
std::unique_ptr<dw::Variable> dw_var = unit_.create_variable(name);
|
||||
|
||||
auto location = std::make_unique<LIEF::dwarf::AddressLoc>(var.address);
|
||||
|
||||
dw_var->set_type(types_.add_type(api_compat::get_type(var.type)));
|
||||
dw_var->set_location(*location);
|
||||
|
||||
dw_var->set_location(LIEF::dwarf::AddressLoc(var.address));
|
||||
|
||||
std::string comment = bv_.GetCommentForAddress(var.address);
|
||||
if (!comment.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user