Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
0vercl0k committed Jun 8, 2024
1 parent 8d14f35 commit 5ec62e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions crates/symbolizer/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub struct NoSymcache;

pub struct Symcache(PathBuf);

/// Builder for [`Symbolizer`].
#[derive(Default, Debug)]
pub struct Builder<SC, M> {
symcache: SC,
Expand Down
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ impl Display for Stats {
}

#[derive(Debug)]
struct ParserWrapper {
struct AddrSpaceWrapper {
parser: KernelDumpParser,
}

impl ParserWrapper {
impl AddrSpaceWrapper {
fn new(parser: KernelDumpParser) -> Self {
Self { parser }
}
}

impl AddrSpace for ParserWrapper {
impl AddrSpace for AddrSpaceWrapper {
fn read_at(&mut self, addr: u64, buf: &mut [u8]) -> io::Result<usize> {
self.parser
.virt_read(addr.into(), buf)
Expand All @@ -105,7 +105,7 @@ impl AddrSpace for ParserWrapper {
}
}

type KernelDumpSymbolizer = Symbolizer<ParserWrapper>;
type KernelDumpSymbolizer = Symbolizer<AddrSpaceWrapper>;

/// The style of the symbols.
#[derive(Default, Debug, Clone, ValueEnum)]
Expand Down Expand Up @@ -349,7 +349,7 @@ fn main() -> Result<()> {
.online(args.symsrv.iter())
.modules(modules.into_iter())
.symcache(&symcache)
.build(ParserWrapper::new(parser))?;
.build(AddrSpaceWrapper::new(parser))?;

let paths = if args.trace.is_dir() {
// If we received a path to a directory as input, then we will try to symbolize
Expand Down

0 comments on commit 5ec62e3

Please sign in to comment.