LLVM  14.0.0git
DebugFrameDataSubsection.h
Go to the documentation of this file.
1 //===- DebugFrameDataSubsection.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 LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
10 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
11 
15 #include "llvm/Support/Endian.h"
16 #include "llvm/Support/Error.h"
17 
18 namespace llvm {
19 namespace codeview {
21 public:
24  static bool classof(const DebugSubsection *S) {
25  return S->kind() == DebugSubsectionKind::FrameData;
26  }
27 
30 
31  FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
32  FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
33 
34  const support::ulittle32_t *getRelocPtr() const { return RelocPtr; }
35 
36 private:
37  const support::ulittle32_t *RelocPtr = nullptr;
39 };
40 
42 public:
43  DebugFrameDataSubsection(bool IncludeRelocPtr)
45  IncludeRelocPtr(IncludeRelocPtr) {}
46  static bool classof(const DebugSubsection *S) {
47  return S->kind() == DebugSubsectionKind::FrameData;
48  }
49 
50  uint32_t calculateSerializedSize() const override;
51  Error commit(BinaryStreamWriter &Writer) const override;
52 
53  void addFrameData(const FrameData &Frame);
54  void setFrames(ArrayRef<FrameData> Frames);
55 
56 private:
57  bool IncludeRelocPtr = false;
58  std::vector<FrameData> Frames;
59 };
60 }
61 }
62 
63 #endif
BinaryStreamReader.h
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::support::detail::packed_endian_specific_integral
Definition: Endian.h:206
llvm::codeview::DebugFrameDataSubsectionRef::end
FixedStreamArray< FrameData >::Iterator end() const
Definition: DebugFrameDataSubsection.h:32
llvm::BinaryStreamWriter
Provides write only access to a subclass of WritableBinaryStream.
Definition: BinaryStreamWriter.h:31
llvm::codeview::DebugFrameDataSubsectionRef
Definition: DebugFrameDataSubsection.h:20
Error.h
llvm::codeview::DebugFrameDataSubsectionRef::classof
static bool classof(const DebugSubsection *S)
Definition: DebugFrameDataSubsection.h:24
llvm::codeview::DebugFrameDataSubsectionRef::getRelocPtr
const support::ulittle32_t * getRelocPtr() const
Definition: DebugFrameDataSubsection.h:34
llvm::codeview::FrameData
Data in the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:572
llvm::codeview::DebugFrameDataSubsection::DebugFrameDataSubsection
DebugFrameDataSubsection(bool IncludeRelocPtr)
Definition: DebugFrameDataSubsection.h:43
llvm::FixedStreamArray
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
Definition: BinaryStreamArray.h:262
llvm::codeview::DebugFrameDataSubsectionRef::begin
FixedStreamArray< FrameData >::Iterator begin() const
Definition: DebugFrameDataSubsection.h:31
llvm::codeview::DebugFrameDataSubsection::commit
Error commit(BinaryStreamWriter &Writer) const override
Definition: DebugFrameDataSubsection.cpp:43
llvm::codeview::DebugSubsectionRef
Definition: DebugSubsection.h:19
CodeView.h
llvm::BinaryStreamReader
Provides read only access to a subclass of BinaryStream.
Definition: BinaryStreamReader.h:31
DebugSubsection.h
llvm::codeview::DebugFrameDataSubsection::setFrames
void setFrames(ArrayRef< FrameData > Frames)
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::codeview::DebugFrameDataSubsectionRef::initialize
Error initialize(BinaryStreamReader Reader)
Definition: DebugFrameDataSubsection.cpp:15
llvm::codeview::DebugFrameDataSubsection::calculateSerializedSize
uint32_t calculateSerializedSize() const override
Definition: DebugFrameDataSubsection.cpp:36
uint32_t
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::codeview::DebugSubsection
Definition: DebugSubsection.h:32
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::codeview::DebugFrameDataSubsection
Definition: DebugFrameDataSubsection.h:41
llvm::codeview::DebugFrameDataSubsection::classof
static bool classof(const DebugSubsection *S)
Definition: DebugFrameDataSubsection.h:46
llvm::codeview::DebugFrameDataSubsection::addFrameData
void addFrameData(const FrameData &Frame)
Definition: DebugFrameDataSubsection.cpp:58
llvm::codeview::DebugSubsectionKind
DebugSubsectionKind
Definition: CodeView.h:313
Endian.h
llvm::FixedStreamArrayIterator
Definition: BinaryStreamArray.h:255
llvm::codeview::DebugSubsectionKind::FrameData
@ FrameData
llvm::BinaryStreamRef
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Definition: BinaryStreamRef.h:156
llvm::codeview::DebugFrameDataSubsectionRef::DebugFrameDataSubsectionRef
DebugFrameDataSubsectionRef()
Definition: DebugFrameDataSubsection.h:22