| 46 | }; |
| 47 | |
| 48 | class CoreFileAnalyzer : public Analyzer |
| 49 | { |
| 50 | public: |
| 51 | // Constructors |
| 52 | explicit CoreFileAnalyzer( |
| 53 | std::string corefile, |
| 54 | std::optional<std::string> executable = std::nullopt, |
| 55 | const std::optional<std::string>& lib_search_path = std::nullopt); |
| 56 | |
| 57 | // Methods |
| 58 | const dwfl_unique_ptr& getDwfl() const override; |
| 59 | std::string locateLibrary(const std::string& lib) const; |
| 60 | |
| 61 | // Destructors |
| 62 | virtual ~CoreFileAnalyzer(); |
| 63 | |
| 64 | // Data members |
| 65 | dwfl_unique_ptr d_dwfl; |
| 66 | char* d_debuginfo_path; |
| 67 | Dwfl_Callbacks d_callbacks; |
| 68 | std::string d_filename; |
| 69 | std::optional<std::string> d_executable; |
| 70 | std::optional<std::string> d_lib_search_path; |
| 71 | int d_fd; |
| 72 | int d_pid; |
| 73 | elf_unique_ptr d_elf; |
| 74 | std::vector<std::string> d_missing_modules{}; |
| 75 | |
| 76 | private: |
| 77 | void removeModuleIf(std::function<bool(Dwfl_Module*)> predicate) const; |
| 78 | void resolveLibraries(); |
| 79 | }; |
| 80 | |
| 81 | class ProcessAnalyzer : public Analyzer |
| 82 | { |
no outgoing calls