1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// EDB - Ethereum Debugger
// Copyright (C) 2024 Zhuo Zhang and Wuqi Zhang
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! EVM execution inspectors for debugging and analysis.
//!
//! This module provides various inspector implementations that hook into the EVM
//! execution process to collect debugging information, create snapshots, and
//! modify execution behavior for debugging purposes.
//!
//! # Inspector Types
//!
//! ## [`CallTracer`]
//! Traces all contract calls during execution, building a hierarchical call tree
//! that captures the complete execution flow including internal calls, delegate calls,
//! and create operations.
//!
//! ## [`HookSnapshotInspector`]
//! Creates detailed snapshots at specific hook points during execution, capturing
//! local variables, state variables, and execution context for source-level debugging.
//! This inspector works with source maps and debug information to provide high-level
//! debugging capabilities.
//!
//! ## [`OpcodeSnapshotInspector`]
//! Creates snapshots at the opcode level, capturing low-level EVM state including
//! stack, memory, storage, and transient storage. Useful for detailed execution
//! analysis and opcode-level debugging.
//!
//! ## [`TweakInspector`]
//! Allows runtime modification of contract bytecode and behavior for debugging
//! purposes. Can inject custom logic, modify return values, and alter execution
//! flow to test different scenarios.
//!
//! # Usage
//!
//! Inspectors are typically chained together to provide comprehensive debugging:
//!
//! ```rust,ignore
//! let call_tracer = CallTracer::new();
//! let hook_inspector = HookSnapshotInspector::new(context);
//! let opcode_inspector = OpcodeSnapshotInspector::new(context);
//! ```
//!
//! # Architecture
//!
//! All inspectors implement the REVM `Inspector` trait. Each inspector focuses
//! on a specific aspect of execution analysis while maintaining minimal overhead
//! when not actively collecting data.
pub use *;
pub use *;
pub use *;
pub use *;