Skip to main content

ghostscope_dwarf/
lib.rs

1//! Ghostscope DWARF Analysis Library
2//!
3//! High-performance DWARF analysis library with on-demand loading architecture
4//! inspired by GDB's cooked index system.
5
6// Core implementation modules
7pub(crate) mod core;
8
9// Internal implementation modules
10pub(crate) mod binary;
11pub(crate) mod dwarf_expr;
12pub(crate) mod index;
13pub(crate) mod loader;
14pub(crate) mod objfile;
15pub(crate) mod parser;
16pub(crate) mod path_match;
17pub(crate) mod semantics;
18
19// Main entry point
20pub(crate) mod analyzer;
21
22// Re-export main public API only
23pub use analyzer::{
24    AddressQueryResult, AnalyzerStats, DwarfAnalyzer, ExecutableFileInfo, FunctionQueryResult,
25    LoadedModuleRuntimeInfo, MainExecutableInfo, ModuleDefaultPolicy, ModuleLoadingEvent,
26    ModuleLoadingStats, ModuleStats, SectionInfo, SharedLibraryInfo, SimpleFileInfo,
27    SourceLineAddressSearch, SourceLineQuerySearch, TypeLookupAmbiguity,
28};
29pub use loader::ExplicitDebugFile;
30
31// Re-export essential core and semantic support types.
32pub use core::{
33    AddressExpr, AmbiguityReason, Availability, CallerFrameRecovery, CfaResult, CuId,
34    DebugInfoSource, DieRef, DwarfError, EntryValueCase, FunctionId, FunctionInfo,
35    GlobalVariableInfo, HelperMode, InlineContextId, MemoryAccessSize, ModuleAddress, ModuleId,
36    PieceLocation, PlanExprOp, Provenance, Result, RuntimeCapabilities, RuntimeRequirement,
37    ScopeId, SectionType, SourceLocation, TargetArch, TypeId, UnsupportedReason, VariableId,
38    VariableLocation, VerifierRisk,
39};
40
41// Re-export semantic contract types.
42pub use semantics::{
43    c_integer_comparison_type, indexable_element_layout, is_c_aggregate_type,
44    is_c_pointer_or_array_type, is_c_signed_integer_type, member_layout, strip_type_aliases,
45    usual_c_arithmetic_comparison_plan, AddressOrigin, AddressSpaceInfo, CIntegerComparisonPlan,
46    CIntegerComparisonType, CfaRulePlan, CompactUnwindRow, CompactUnwindStats, CompactUnwindTable,
47    FunctionParameter, IndexableElementLayout, InlineFrame, LvalueAddressPlan, MemberLayout,
48    PcContext, PcLineInfo, PcRange, PlannedAddress, PlannedAddressKind, PlannedValue,
49    RegisterRecoveryPlan, RuntimeComputedExpr, RuntimeComputedKind, TypeLayoutError,
50    UnwindDiagnostic, UnwindDiagnosticKind, VariableAccessPath, VariableAccessSegment,
51    VariableLoweringKind, VariableLoweringPlan, VariableMaterialization,
52    VariableMaterializationPlan, VariablePlan, VariableQueryDiagnostic, VariableReadPlan,
53    VisibleVariable, VisibleVariablesResult,
54};
55
56// Re-export type definitions from protocol (avoiding circular dependencies)
57pub use ghostscope_protocol::{
58    EnumVariant, StructMember, TypeCache, TypeInfo, TypeKind, TypeQualifier,
59};
60
61// Re-export gimli types that external users need
62pub use gimli::{constants, DwAte};