25 #ifndef PSTORE_MCREPO_DEBUG_LINE_SECTION_HPP 26 #define PSTORE_MCREPO_DEBUG_LINE_SECTION_HPP 29 #include "pstore/core/index_types.hpp" 40 template <
typename DataRange,
typename IFixupRange,
typename XFixupRange>
45 : header_digest_{header_digest}
46 , header_{header_extent}
47 , g_{src.data_range, src.ifixups_range, src.xfixups_range, align} {}
50 index::digest const & header_digest ()
const noexcept {
return header_digest_; }
54 unsigned align ()
const noexcept {
return g_.align (); }
58 std::size_t
size () const noexcept {
return this->payload ().size (); }
67 template <
typename DataRange,
typename IFixupRange,
typename XFixupRange>
68 static std::size_t
size_bytes (DataRange
const & d, IFixupRange
const & i,
69 XFixupRange
const & x) {
73 template <
typename DataRange,
typename IFixupRange,
typename XFixupRange>
76 return size_bytes (src.data_range, src.ifixups_range, src.xfixups_range);
84 static_assert (std::is_standard_layout<debug_line_section>::value,
85 "debug_line_section must be standard-layout");
87 "debug_line_section alignment must be 16");
91 inline unsigned section_alignment<pstore::repo::debug_line_section> (
96 inline std::uint64_t section_size<pstore::repo::debug_line_section> (
108 , header_digest_{header_digest}
120 std::uint8_t * write (std::uint8_t * out)
const final;
123 std::uintptr_t aligned_impl (std::uintptr_t in)
const override;
141 std::size_t
size_bytes ()
const final {
return d_.size_bytes (); }
142 unsigned align ()
const final {
return d_.align (); }
143 std::size_t
size ()
const final {
return d_.size (); }
161 #endif // PSTORE_MCREPO_DEBUG_LINE_SECTION_HPP Declares the generic section.
Definition: uint128.hpp:85
A simple wrapper around the elements of one of the three arrays that make up a section.
Definition: section.hpp:152
Definition: debug_line_section.hpp:38
Maps from the type of data that is associated with a fragment's section to a "dispatcher" subclass wh...
Definition: section.hpp:146
Describes the three members of a section as three pairs of iterators: one each for the data...
Definition: generic_section.hpp:187
This class is used to add virtual methods to a fragment's section.
Definition: section.hpp:195
Definition: debug_line_section.hpp:135
Definition: generic_section.hpp:177
An empty class used as the base type for all sections.
Definition: section.hpp:69
container< std::uint8_t > payload() const final
Return the data section stored in the object file.
Definition: debug_line_section.hpp:146
Maps from the type of data that is associated with a fragment's section to a "dispatcher" subclass wh...
Definition: section.hpp:214
std::size_t size_bytes() const
A group of member functions which return the number of bytes occupied by a fragment instance...
Definition: generic_section.cpp:83
Definition: nonpod2.cpp:40
Definition: generic_section.hpp:386
std::size_t size_bytes() const
Definition: debug_line_section.hpp:63
A section creation dispatcher is used to instantiate and construct each of a fragment's sections in p...
Definition: section.hpp:91
std::size_t size() const noexcept
Definition: debug_line_section.hpp:58
Definition: debug_line_section.hpp:102