diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index c1ad0e8c1..3c2a3f41c 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,3 +1,8 @@ +Unreleased +---------- +- Added support for symbolization of kernel addresses + + 0.1.6 ----- - Added `--procmap-query` option to `normalize user` sub-command diff --git a/cli/src/args.rs b/cli/src/args.rs index acb4ae5cc..3fa175f3a 100644 --- a/cli/src/args.rs +++ b/cli/src/args.rs @@ -175,6 +175,7 @@ pub mod symbolize { Elf(Elf), Gsym(Gsym), Process(Process), + Kernel(Kernel), } #[derive(Debug, Arguments)] @@ -246,4 +247,11 @@ pub mod symbolize { #[clap(long)] pub no_map_files: bool, } + + #[derive(Debug, Arguments)] + pub struct Kernel { + /// The addresses to symbolize. + #[arg(value_parser = parse_addr)] + pub addrs: Vec, + } } diff --git a/cli/src/main.rs b/cli/src/main.rs index e1a2a31f8..9b1f6ed89 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -255,6 +255,15 @@ fn symbolize(symbolize: args::symbolize::Symbolize) -> Result<()> { let input = symbolize::Input::AbsAddr(addrs); (src, input, addrs) } + args::symbolize::Symbolize::Kernel(args::symbolize::Kernel { + ref addrs, + }) => { + let kernel = symbolize::Kernel::default(); + let src = symbolize::Source::from(kernel); + let addrs = addrs.as_slice(); + let input = symbolize::Input::AbsAddr(addrs); + (src, input, addrs) + } }; let symbolizer = builder.build();