Lines Matching refs:pc
183 bool Step(uintptr_t& pc, uintptr_t& sp, void *ctx);
184 bool FpStep(uintptr_t& fp, uintptr_t& pc, void *ctx);
195 bool GetFrameByPc(uintptr_t pc, std::shared_ptr<DfxMaps> maps, DfxFrame& frame);
217 uintptr_t pc = 0; member
238 void DoPcAdjust(uintptr_t& pc);
390 bool Unwinder::Step(uintptr_t& pc, uintptr_t& sp, void *ctx) in Step() argument
392 return impl_->Step(pc, sp, ctx); in Step()
395 bool Unwinder::FpStep(uintptr_t& fp, uintptr_t& pc, void *ctx) in FpStep() argument
397 return impl_->FpStep(fp, pc, ctx); in FpStep()
430 bool Unwinder::GetFrameByPc(uintptr_t pc, std::shared_ptr<DfxMaps> maps, DfxFrame& frame) in GetFrameByPc() argument
432 return impl_->GetFrameByPc(pc, maps, frame); in GetFrameByPc()
680 DFX_TRACE_SCOPED_DLSYM("StepArkJsFrame pc: %p", reinterpret_cast<void *>(frame.pc)); in StepArkJsFrame()
682 timeLimitCheck << "StepArkJsFrame, ark pc: " << reinterpret_cast<void *>(frame.pc) << in StepArkJsFrame()
687 LOGD("+++ark pc: %p, fp: %p, sp: %p, isJsFrame: %d.", reinterpret_cast<void *>(frame.pc), in StepArkJsFrame()
702 if (DfxArk::GetArkNativeFrameInfo(pid, frame.pc, frame.fp, frame.sp, jsFrames, size) < 0) { in StepArkJsFrame()
724 … ArkUnwindParam arkParam(memory_.get(), &(Unwinder::AccessMem), &frame.fp, &frame.sp, &frame.pc, in StepArkJsFrame()
728 … ret = DfxArk::StepArkFrame(memory_.get(), &(Unwinder::AccessMem), &frame.fp, &frame.sp, &frame.pc, in StepArkJsFrame()
740 LOGD("---ark pc: %p, fp: %p, sp: %p, isJsFrame: %d.", reinterpret_cast<void *>(frame.pc), in StepArkJsFrame()
772 frame.pc = regs_->GetPc(); in Unwind()
777 regs_->StepIfSignalFrame(static_cast<uintptr_t>(frame.pc), memory_)) { in Unwind()
778 LOGW("Step signal frame, pc: %p", reinterpret_cast<void *>(frame.pc)); in Unwind()
784 DoPcAdjust(frame.pc); in Unwind()
788 uintptr_t prevPc = frame.pc; in Unwind()
794 if (frame.pc == prevPc && frame.sp == prevSp) { in Unwind()
801 lastErrorData_.SetAddrAndCode(frame.pc, UNW_ERROR_REPEATED_FRAME); in Unwind()
831 uintptr_t pc = regs_->GetPc(); in UnwindByFp() local
834 DoPcAdjust(pc); in UnwindByFp()
837 pcs_.emplace_back(pc); in UnwindByFp()
839 if (!FpStep(fp, pc, ctx) || (pc == 0)) { in UnwindByFp()
846 bool Unwinder::Impl::FpStep(uintptr_t& fp, uintptr_t& pc, void *ctx) in FpStep() argument
849 LOGU("+fp: %lx, pc: %lx", (uint64_t)fp, (uint64_t)pc); in FpStep()
861 memory_->ReadUptr(ptr, &pc, false)) { in FpStep()
864 lastErrorData_.SetAddrAndCode(pc, UNW_ERROR_ILLEGAL_VALUE); in FpStep()
869 regs_->SetPc(StripPac(pc, pacMask_)); in FpStep()
870 LOGU("-fp: %lx, pc: %lx", (uint64_t)fp, (uint64_t)pc); in FpStep()
877 bool Unwinder::Impl::Step(uintptr_t& pc, uintptr_t& sp, void *ctx) in Step() argument
879 DFX_TRACE_SCOPED_DLSYM("Step pc:%p", reinterpret_cast<void *>(pc)); in Step()
886 frame.pc = pc; in Step()
890 if (regs_->StepIfSignalFrame(frame.pc, memory_)) { in Step()
891 LOGW("Step signal frame, pc: %p", reinterpret_cast<void *>(frame.pc)); in Step()
896 pc = frame.pc; in Step()
908 LOGU("+pc: %p, sp: %p, fp: %p", reinterpret_cast<void *>(frame.pc), in StepInner()
918 auto iter = stepCache_.find(frame.pc); in StepInner()
921 LOGU("Find rs cache, pc: %p", reinterpret_cast<void *>(frame.pc)); in StepInner()
932 MAYBE_UNUSED int mapRet = acc_->GetMapByPc(frame.pc, map, ctx); in StepInner()
940 lastErrorData_.SetAddrAndCode(frame.pc, mapRet); in StepInner()
956 LOGE("Failed to step ark Js frame, pc: %p", reinterpret_cast<void *>(frame.pc)); in StepInner()
957 lastErrorData_.SetAddrAndCode(frame.pc, UNW_ERROR_STEP_ARK_FRAME); in StepInner()
961 regs_->SetPc(StripPac(frame.pc, pacMask_)); in StepInner()
979 MAYBE_UNUSED int utiRet = acc_->FindUnwindTable(frame.pc, uti, ctx); in StepInner()
981 lastErrorData_.SetAddrAndCode(frame.pc, utiRet); in StepInner()
991 if (!armExidx_->SearchEntry(frame.pc, uti, uei)) { in StepInner()
1005 if ((uti.isLinear == false && !dwarfSection_->SearchEntry(frame.pc, uti, uei)) || in StepInner()
1006 (uti.isLinear == true && !dwarfSection_->LinearSearchEntry(frame.pc, uti, uei))) { in StepInner()
1012 if (!dwarfSection_->Step(frame.pc, (uintptr_t)uei.unwindInfo, rs)) { in StepInner()
1025 stepCache_.emplace(frame.pc, cache); in StepInner()
1058 ret = FpStep(frame.fp, frame.pc, ctx); in StepInner()
1061 LOGI("First enter fp step, pc: %p", reinterpret_cast<void *>(frame.pc)); in StepInner()
1068 frame.pc = regs_->GetPc(); in StepInner()
1073 lastErrorData_.SetAddrAndCode(frame.pc, UNW_ERROR_ILLEGAL_VALUE); in StepInner()
1076 if (ret && (frame.pc == 0)) { in StepInner()
1079 LOGU("-pc: %p, sp: %p, fp: %p, ret: %d", reinterpret_cast<void *>(frame.pc), in StepInner()
1111 void Unwinder::Impl::DoPcAdjust(uintptr_t& pc) in DoPcAdjust() argument
1113 if (pc <= 0x4) { in DoPcAdjust()
1118 if ((pc & 0x1) && (memory_ != nullptr)) { in DoPcAdjust()
1120 if (pc < 0x5 || !(memory_->ReadMem(pc - 0x5, &val)) || in DoPcAdjust()
1128 pc -= sz; in DoPcAdjust()
1166 pcs_.emplace_back(frame.pc); in AddFrame()
1170 dfxFrame.pc = static_cast<uint64_t>(frame.pc); in AddFrame()
1224 frame.relPc = frame.pc; in FillFrame()
1231 frame.relPc = frame.map->GetRelPc(frame.pc); in FillFrame()
1268 …if (!hap->ParseHapInfo(pid_, frame.pc, static_cast<uintptr_t>(frame.funcOffset), frame.map, &jsFun… in FillJsFrame()
1291 …if (DfxArk::ParseArkFrameInfoLocal(static_cast<uintptr_t>(frame.pc), static_cast<uintptr_t>(frame.… in FillJsFrameLocal()
1294 reinterpret_cast<void *>(frame.pc), reinterpret_cast<void *>(frame.map->begin)); in FillJsFrameLocal()
1301 bool Unwinder::Impl::GetFrameByPc(uintptr_t pc, std::shared_ptr<DfxMaps> maps, DfxFrame &frame) in GetFrameByPc() argument
1303 frame.pc = static_cast<uint64_t>(StripPac(pc, 0)); in GetFrameByPc()
1305 if ((maps == nullptr) || !maps->FindMapByAddr(pc, map) || map == nullptr) { in GetFrameByPc()
1353 frame.pc = static_cast<uint64_t>(StripPac(pcs[i], 0)); in GetFramesByPcs()
1354 if ((map != nullptr) && map->Contain(frame.pc)) { in GetFramesByPcs()
1373 frame.pc = static_cast<uint64_t>(pcs[i]); in GetLocalFramesByPcs()
1379 bool Unwinder::GetSymbolByPc(uintptr_t pc, std::shared_ptr<DfxMaps> maps, std::string& funcName, ui… in GetSymbolByPc() argument
1385 if (!maps->FindMapByAddr(pc, map) || (map == nullptr)) { in GetSymbolByPc()
1389 uint64_t relPc = map->GetRelPc(static_cast<uint64_t>(pc)); in GetSymbolByPc()
1407 frame->pc = StripPac(frame->pc, 0); in DlPhdrCallback()
1411 if (frame->pc >= vaddr && frame->pc < vaddr + phdr->p_memsz) { in DlPhdrCallback()
1412 frame->relPc = frame->pc - info->dlpi_addr; in DlPhdrCallback()