Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

86 lines
2.9 KiB
C++

//===-- DWARFContext.h ------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFCONTEXT_H
#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFCONTEXT_H
#include "DWARFDataExtractor.h"
#include "lldb/Core/Section.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/Support/Threading.h"
#include <memory>
#include <optional>
namespace lldb_private::plugin {
namespace dwarf {
class DWARFContext {
private:
SectionList *m_main_section_list;
SectionList *m_dwo_section_list;
mutable std::unique_ptr<llvm::DWARFContext> m_llvm_context;
struct SectionData {
llvm::once_flag flag;
DWARFDataExtractor data;
};
SectionData m_data_debug_abbrev;
SectionData m_data_debug_addr;
SectionData m_data_debug_aranges;
SectionData m_data_debug_cu_index;
SectionData m_data_debug_info;
SectionData m_data_debug_line;
SectionData m_data_debug_line_str;
SectionData m_data_debug_loc;
SectionData m_data_debug_loclists;
SectionData m_data_debug_macro;
SectionData m_data_debug_ranges;
SectionData m_data_debug_rnglists;
SectionData m_data_debug_str;
SectionData m_data_debug_str_offsets;
SectionData m_data_debug_tu_index;
SectionData m_data_debug_types;
const DWARFDataExtractor &
LoadOrGetSection(std::optional<lldb::SectionType> main_section_type,
std::optional<lldb::SectionType> dwo_section_type,
SectionData &data);
const DWARFDataExtractor &getOrLoadCuIndexData();
const DWARFDataExtractor &getOrLoadTuIndexData();
public:
explicit DWARFContext(SectionList *main_section_list,
SectionList *dwo_section_list)
: m_main_section_list(main_section_list),
m_dwo_section_list(dwo_section_list) {}
const DWARFDataExtractor &getOrLoadAbbrevData();
const DWARFDataExtractor &getOrLoadAddrData();
const DWARFDataExtractor &getOrLoadArangesData();
const DWARFDataExtractor &getOrLoadDebugInfoData();
const DWARFDataExtractor &getOrLoadLineData();
const DWARFDataExtractor &getOrLoadLineStrData();
const DWARFDataExtractor &getOrLoadLocData();
const DWARFDataExtractor &getOrLoadLocListsData();
const DWARFDataExtractor &getOrLoadMacroData();
const DWARFDataExtractor &getOrLoadRangesData();
const DWARFDataExtractor &getOrLoadRngListsData();
const DWARFDataExtractor &getOrLoadStrData();
const DWARFDataExtractor &getOrLoadStrOffsetsData();
const DWARFDataExtractor &getOrLoadDebugTypesData();
bool isDwo() { return m_dwo_section_list != nullptr; }
llvm::DWARFContext &GetAsLLVM();
};
} // namespace dwarf
} // namespace lldb_private::plugin
#endif