Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d60e1d72 authored by Christopher Ferris's avatar Christopher Ferris Committed by android-build-merger
Browse files

Merge "Always init gnu_debugdata interface if it exists."

am: afd6e771

Change-Id: I0494edbc6ce63bf6e8a678a2f16290af83d262a1
parents 7eb90271 afd6e771
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ std::string UnwindStackMap::GetFunctionName(uint64_t pc, uint64_t* offset) {
    return "";
  }

  unwindstack::Elf* elf = map_info->GetElf(process_memory(), true);
  unwindstack::Elf* elf = map_info->GetElf(process_memory());

  std::string name;
  uint64_t func_offset;
+2 −6
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ bool Elf::cache_enabled_;
std::unordered_map<std::string, std::pair<std::shared_ptr<Elf>, bool>>* Elf::cache_;
std::mutex* Elf::cache_lock_;

bool Elf::Init(bool init_gnu_debugdata) {
bool Elf::Init() {
  load_bias_ = 0;
  if (!memory_) {
    return false;
@@ -54,11 +54,7 @@ bool Elf::Init(bool init_gnu_debugdata) {
  valid_ = interface_->Init(&load_bias_);
  if (valid_) {
    interface_->InitHeaders(load_bias_);
    if (init_gnu_debugdata) {
    InitGnuDebugdata();
    } else {
      gnu_debugdata_interface_.reset(nullptr);
    }
  } else {
    interface_.reset(nullptr);
  }
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ uint64_t Global::GetVariableOffset(MapInfo* info, const std::string& variable) {
    }
  }

  Elf* elf = info->GetElf(memory_, true);
  Elf* elf = info->GetElf(memory_);
  uint64_t ptr;
  // Find first non-empty list (libraries might be loaded multiple times).
  if (elf->GetGlobalVariable(variable, &ptr) && ptr != 0) {
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ Elf* JitDebug::GetElf(Maps* maps, uint64_t pc) {
    entry_addr_ = (this->*read_entry_func_)(&start, &size);

    Elf* elf = new Elf(new MemoryRange(memory_, start, size, 0));
    elf->Init(true);
    elf->Init();
    if (!elf->valid()) {
      // The data is not formatted in a way we understand, do not attempt
      // to process any other entries.
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ bool LocalUnwinder::Unwind(std::vector<LocalFrameData>* frame_info, size_t max_f
      break;
    }

    Elf* elf = map_info->GetElf(process_memory_, true);
    Elf* elf = map_info->GetElf(process_memory_);
    uint64_t rel_pc = elf->GetRelPc(cur_pc, map_info);
    uint64_t step_pc = rel_pc;
    uint64_t pc_adjustment;
Loading