diff --git a/runtime/include/tooling/debug_interface.h b/runtime/include/tooling/debug_interface.h index 693ecb1..a1bd76d 100644 --- a/runtime/include/tooling/debug_interface.h +++ b/runtime/include/tooling/debug_interface.h @@ -490,6 +490,8 @@ public: virtual std::optional SetPropertyModificationWatch(PtClass klass, PtProperty property) = 0; + virtual std::optional GetThisVariableByFrame(PtThread thread, uint32_t frameDepth, PtValue *value) = 0; + virtual std::optional ClearPropertyModificationWatch(PtClass klass, PtProperty property) = 0; // * * * * * diff --git a/runtime/tooling/debugger.cpp b/runtime/tooling/debugger.cpp index 11c083d..ecea47f 100644 --- a/runtime/tooling/debugger.cpp +++ b/runtime/tooling/debugger.cpp @@ -166,6 +166,11 @@ Expected Debugger::GetVRegByPtThread(PtThread Error(Error::Type::INVALID_REGISTER, std::string("Invalid register number: ") + std::to_string(regNumber))); } +std::optional Debugger::GetThisVariableByFrame(PtThread thread, uint32_t frameDepth, PtValue *result) +{ + return {}; +} + std::optional Debugger::GetVariable(PtThread thread, uint32_t frameDepth, int32_t regNumber, PtValue *result) const { @@ -790,11 +795,11 @@ static uint64_t GetVRegValue(const Frame::VRegister ®) } // 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; diff --git a/runtime/tooling/debugger.h b/runtime/tooling/debugger.h index 6da67a2..021c165 100644 --- a/runtime/tooling/debugger.h +++ b/runtime/tooling/debugger.h @@ -363,6 +363,8 @@ public: std::optional ClearPropertyModificationWatch(PtClass klass, PtProperty property) override; + std::optional GetThisVariableByFrame(PtThread thread, uint32_t frameDepth, PtValue *result) override; + private: Expected GetVRegByPtThread(PtThread thread, uint32_t frameDepth, int32_t regNumber) const;