1 //===-- PECallFrameInfo.h ---------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_PECOFF_PECALLFRAMEINFO_H 10 #define LLDB_SOURCE_PLUGINS_OBJECTFILE_PECOFF_PECALLFRAMEINFO_H 11 12 #include "lldb/Symbol/CallFrameInfo.h" 13 #include "lldb/Utility/DataExtractor.h" 14 15 class ObjectFilePECOFF; 16 17 namespace llvm { 18 namespace Win64EH { 19 20 struct RuntimeFunction; 21 22 } 23 } // namespace llvm 24 25 class PECallFrameInfo : public virtual lldb_private::CallFrameInfo { 26 public: 27 explicit PECallFrameInfo(ObjectFilePECOFF &object_file, 28 uint32_t exception_dir_rva, 29 uint32_t exception_dir_size); 30 31 bool GetAddressRange(lldb_private::Address addr, 32 lldb_private::AddressRange &range) override; 33 34 bool GetUnwindPlan(const lldb_private::Address &addr, 35 lldb_private::UnwindPlan &unwind_plan) override; 36 bool GetUnwindPlan(const lldb_private::AddressRange &range, 37 lldb_private::UnwindPlan &unwind_plan) override; 38 39 private: 40 const llvm::Win64EH::RuntimeFunction *FindRuntimeFunctionIntersectsWithRange( 41 const lldb_private::AddressRange &range) const; 42 43 ObjectFilePECOFF &m_object_file; 44 lldb_private::DataExtractor m_exception_dir; 45 }; 46 47 #endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_PECOFF_PECALLFRAMEINFO_H 48