brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 3cf70a4 Raw
45 lines · c
1//===-- HistoryUnwind.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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_HISTORYUNWIND_H10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_HISTORYUNWIND_H11 12#include <vector>13 14#include "lldb/Target/Unwind.h"15#include "lldb/lldb-private.h"16 17namespace lldb_private {18 19class HistoryUnwind : public lldb_private::Unwind {20public:21  HistoryUnwind(Thread &thread, std::vector<lldb::addr_t> pcs,22                HistoryPCType pc_type = HistoryPCType::Returns);23 24  ~HistoryUnwind() override;25 26protected:27  void DoClear() override;28 29  lldb::RegisterContextSP30  DoCreateRegisterContextForFrame(StackFrame *frame) override;31 32  bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,33                             lldb::addr_t &pc,34                             bool &behaves_like_zeroth_frame) override;35  uint32_t DoGetFrameCount() override;36 37private:38  std::vector<lldb::addr_t> m_pcs;39  HistoryPCType m_pc_type;40};41 42} // namespace lldb_private43 44#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_HISTORYUNWIND_H45