Sync wagner-mater to ohos-master

Signed-off-by: shawn_hu_ls <huxiaowei3@huawei.com>
This commit is contained in:
shawn_hu_ls
2021-12-17 14:51:22 +08:00
parent 2e6f195caf
commit 3d69f65a48
3 changed files with 13 additions and 4 deletions
@@ -490,6 +490,8 @@ public:
virtual std::optional<Error> SetPropertyModificationWatch(PtClass klass, PtProperty property) = 0;
virtual std::optional<Error> GetThisVariableByFrame(PtThread thread, uint32_t frameDepth, PtValue *value) = 0;
virtual std::optional<Error> ClearPropertyModificationWatch(PtClass klass, PtProperty property) = 0;
// * * * * *
+9 -4
View File
@@ -166,6 +166,11 @@ Expected<panda::Frame::VRegister *, Error> Debugger::GetVRegByPtThread(PtThread
Error(Error::Type::INVALID_REGISTER, std::string("Invalid register number: ") + std::to_string(regNumber)));
}
std::optional<Error> Debugger::GetThisVariableByFrame(PtThread thread, uint32_t frameDepth, PtValue *result)
{
return {};
}
std::optional<Error> Debugger::GetVariable(PtThread thread, uint32_t frameDepth, int32_t regNumber,
PtValue *result) const
{
@@ -790,11 +795,11 @@ static uint64_t GetVRegValue(const Frame::VRegister &reg)
}
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
PtDebugFrame::PtDebugFrame(Method *method, const Frame *interpreterFrame) : method_(MethodToPtMethod(method))
PtDebugFrame::PtDebugFrame(Method *method, const Frame *interpreterFrame)
: method_(MethodToPtMethod(method)),
method_id_(method->GetFileId()),
panda_file_(method->GetPandaFile()->GetFilename())
{
panda_file_ = method->GetPandaFile()->GetFilename();
method_id_ = method->GetFileId();
is_interpreter_frame_ = interpreterFrame != nullptr;
if (!is_interpreter_frame_) {
return;
+2
View File
@@ -363,6 +363,8 @@ public:
std::optional<Error> ClearPropertyModificationWatch(PtClass klass, PtProperty property) override;
std::optional<Error> GetThisVariableByFrame(PtThread thread, uint32_t frameDepth, PtValue *result) override;
private:
Expected<panda::Frame::VRegister *, Error> GetVRegByPtThread(PtThread thread, uint32_t frameDepth,
int32_t regNumber) const;