Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Fix debug asssert in profile subcommand args parsing #1825

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/fixed-profile-cmd-debug-assert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cli: Rename struct to avoid debug assert in `profile` subcommand. Fix #1808.
4 changes: 2 additions & 2 deletions probe-rs/src/bin/probe-rs/cmd/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use crate::util::flash::run_flash_download;
use tracing::info;

#[derive(clap::Parser)]
pub struct Cmd {
pub struct ProfileCmd {
#[clap(flatten)]
run: super::run::Cmd,
/// Flash the ELF before profiling
Expand Down Expand Up @@ -71,7 +71,7 @@ impl core::fmt::Display for ProfileMethod {
}
}

impl Cmd {
impl ProfileCmd {
pub fn run(self) -> anyhow::Result<()> {
let (mut session, probe_options) = self.run.probe_options.simple_attach()?;

Expand Down
2 changes: 1 addition & 1 deletion probe-rs/src/bin/probe-rs/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ enum Subcommand {
/// Measure the throughput of the selected debug probe
Benchmark(cmd::benchmark::Cmd),
/// Profile on-target runtime performance of target ELF program
Profile(cmd::profile::Cmd),
Profile(cmd::profile::ProfileCmd),
Read(cmd::read::Cmd),
Write(cmd::write::Cmd),
}
Expand Down