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 modules
7pub 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 semantics;
17
18// Main entry point
19pub mod analyzer;
20
21// Re-export main public API only
22pub use analyzer::{
23    AddressQueryResult, DwarfAnalyzer, FunctionQueryResult, MainExecutableInfo, ModuleLoadingEvent,
24    ModuleLoadingStats, ModuleStats, SharedLibraryInfo, SimpleFileInfo,
25};
26
27// Re-export essential core types
28pub use core::{
29    // Evaluation types for LLVM codegen
30    CfaResult,
31    ComputeStep,
32    DirectValueResult,
33    DwarfError,
34    EvaluationResult,
35    FunctionInfo,
36    LocationResult,
37    MemoryAccessSize,
38    ModuleAddress,
39    PieceResult,
40    Result,
41    SourceLocation,
42    VariableInfo,
43};
44
45// Re-export type definitions from protocol (avoiding circular dependencies)
46pub use ghostscope_protocol::{
47    EnumVariant, StructMember, TypeCache, TypeInfo, TypeKind, TypeQualifier,
48};
49
50// Re-export data types needed by external users
51pub use parser::VariableWithEvaluation;
52
53// Re-export gimli types that external users need
54pub use gimli::{constants, DwAte};