| 11 | namespace pystack { |
| 12 | |
| 13 | class FrameObject |
| 14 | { |
| 15 | public: |
| 16 | // Constructors |
| 17 | FrameObject( |
| 18 | const std::shared_ptr<const AbstractProcessManager>& manager, |
| 19 | remote_addr_t addr, |
| 20 | ssize_t frame_no); |
| 21 | |
| 22 | // Getters |
| 23 | ssize_t FrameNo() const; |
| 24 | std::shared_ptr<FrameObject> PreviousFrame(); |
| 25 | std::shared_ptr<CodeObject> Code(); |
| 26 | const std::unordered_map<std::string, std::string>& Arguments() const; |
| 27 | const std::unordered_map<std::string, std::string>& Locals() const; |
| 28 | bool IsEntryFrame() const; |
| 29 | bool IsShim() const; |
| 30 | |
| 31 | // Methods |
| 32 | void resolveLocalVariables(); |
| 33 | |
| 34 | private: |
| 35 | // Methods |
| 36 | static bool getIsShim( |
| 37 | const std::shared_ptr<const AbstractProcessManager>& manager, |
| 38 | Structure<py_frame_v>& frame); |
| 39 | |
| 40 | static std::unique_ptr<CodeObject> |
| 41 | getCode(const std::shared_ptr<const AbstractProcessManager>& manager, Structure<py_frame_v>& frame); |
| 42 | |
| 43 | bool |
| 44 | isEntry(const std::shared_ptr<const AbstractProcessManager>& manager, Structure<py_frame_v>& frame); |
| 45 | |
| 46 | // Data members |
| 47 | const std::shared_ptr<const AbstractProcessManager> d_manager{}; |
| 48 | remote_addr_t d_addr{}; |
| 49 | ssize_t d_frame_no{}; |
| 50 | std::shared_ptr<FrameObject> d_prev{nullptr}; |
| 51 | std::shared_ptr<CodeObject> d_code{nullptr}; |
| 52 | std::unordered_map<std::string, std::string> d_arguments{}; |
| 53 | std::unordered_map<std::string, std::string> d_locals{}; |
| 54 | bool d_is_entry; |
| 55 | bool d_is_shim; |
| 56 | }; |
| 57 | } // namespace pystack |
nothing calls this directly
no outgoing calls
no test coverage detected