isr_dwarf/error.rs
1/// Errors surfaced while building a profile from DWARF debug info.
2#[derive(thiserror::Error, Debug)]
3pub enum Error {
4 /// I/O error while reading the kernel image or `System.map`.
5 #[error(transparent)]
6 Io(#[from] std::io::Error),
7
8 /// Failed to parse the kernel image as an object file.
9 #[error(transparent)]
10 Object(#[from] object::Error),
11
12 /// Error from the `gimli` DWARF parser.
13 #[error(transparent)]
14 Gimli(#[from] gimli::Error),
15
16 /// The supplied `System.map` is not in the expected format.
17 #[error("invalid system map")]
18 InvalidSystemMap,
19
20 /// Failed to serialize the generated profile.
21 #[error("serialization error: {0}")]
22 Serialization(Box<dyn std::error::Error + Send + Sync>),
23}