LLDB  mainline
HistoryUnwind.h
Go to the documentation of this file.
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_HISTORYUNWIND_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_HISTORYUNWIND_H
11 
12 #include <vector>
13 
14 #include "lldb/Target/Unwind.h"
15 #include "lldb/lldb-private.h"
16 
17 namespace lldb_private {
18 
20 public:
21  HistoryUnwind(Thread &thread, std::vector<lldb::addr_t> pcs,
22  bool pcs_are_call_addresses = false);
23 
24  ~HistoryUnwind() override;
25 
26 protected:
27  void DoClear() override;
28 
29  lldb::RegisterContextSP
31 
32  bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
34  bool &behaves_like_zeroth_frame) override;
35  uint32_t DoGetFrameCount() override;
36 
37 private:
38  std::vector<lldb::addr_t> m_pcs;
39  /// This boolean indicates that the PCs in the non-0 frames are call
40  /// addresses and not return addresses.
42 };
43 
44 } // namespace lldb_private
45 
46 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_HISTORYUNWIND_H
lldb_private::HistoryUnwind
Definition: HistoryUnwind.h:19
Unwind.h
lldb_private::HistoryUnwind::~HistoryUnwind
~HistoryUnwind() override
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
pc
@ pc
Definition: CompactUnwindInfo.cpp:1250
lldb_private::HistoryUnwind::HistoryUnwind
HistoryUnwind(Thread &thread, std::vector< lldb::addr_t > pcs, bool pcs_are_call_addresses=false)
Definition: HistoryUnwind.cpp:26
lldb_private::Thread
Definition: Thread.h:60
lldb_private::HistoryUnwind::DoGetFrameCount
uint32_t DoGetFrameCount() override
Definition: HistoryUnwind.cpp:73
lldb_private::HistoryUnwind::DoCreateRegisterContextForFrame
lldb::RegisterContextSP DoCreateRegisterContextForFrame(StackFrame *frame) override
Definition: HistoryUnwind.cpp:41
lldb_private::HistoryUnwind::DoGetFrameInfoAtIndex
bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa, lldb::addr_t &pc, bool &behaves_like_zeroth_frame) override
Definition: HistoryUnwind.cpp:55
lldb-private.h
uint32_t
lldb_private::HistoryUnwind::m_pcs
std::vector< lldb::addr_t > m_pcs
Definition: HistoryUnwind.h:38
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::HistoryUnwind::DoClear
void DoClear() override
Definition: HistoryUnwind.cpp:35
lldb_private::StackFrame
Definition: StackFrame.h:40
lldb_private::Unwind
Definition: Unwind.h:18
lldb_private::HistoryUnwind::m_pcs_are_call_addresses
bool m_pcs_are_call_addresses
This boolean indicates that the PCs in the non-0 frames are call addresses and not return addresses.
Definition: HistoryUnwind.h:41