LLDB  mainline
DWARFCompileUnit.h
Go to the documentation of this file.
1 //===-- DWARFCompileUnit.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 SymbolFileDWARF_DWARFCompileUnit_h_
10 #define SymbolFileDWARF_DWARFCompileUnit_h_
11 
12 #include "DWARFUnit.h"
13 #include "llvm/Support/Error.h"
14 
15 class DWARFCompileUnit : public DWARFUnit {
16 public:
17  static llvm::Expected<DWARFUnitSP>
18  extract(SymbolFileDWARF *dwarf2Data, lldb::user_id_t uid,
19  const lldb_private::DWARFDataExtractor &debug_info,
20  lldb::offset_t *offset_ptr);
21  void Dump(lldb_private::Stream *s) const override;
22 
23  /// Get the data that contains the DIE information for this unit.
24  ///
25  /// \return
26  /// The correct data (.debug_types for DWARF 4 and earlier, and
27  /// .debug_info for DWARF 5 and later) for the DIE information in
28  /// this unit.
29  const lldb_private::DWARFDataExtractor &GetData() const override;
30 
31  /// Get the size in bytes of the header.
32  ///
33  /// \return
34  /// Byte size of the compile unit header
35  uint32_t GetHeaderByteSize() const override;
36 
37 private:
39  DISALLOW_COPY_AND_ASSIGN(DWARFCompileUnit);
40 };
41 
42 #endif // SymbolFileDWARF_DWARFCompileUnit_h_
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
uint32_t GetHeaderByteSize() const override
Get the size in bytes of the header.
const lldb_private::DWARFDataExtractor & GetData() const override
Get the data that contains the DIE information for this unit.
uint64_t user_id_t
Definition: lldb-types.h:84
uint64_t offset_t
Definition: lldb-types.h:87
void Dump(lldb_private::Stream *s) const override
static llvm::Expected< DWARFUnitSP > extract(SymbolFileDWARF *dwarf2Data, lldb::user_id_t uid, const lldb_private::DWARFDataExtractor &debug_info, lldb::offset_t *offset_ptr)