Skip to content
Open
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
11 changes: 10 additions & 1 deletion objdiff-core/src/jobs/create_scratch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use typed_path::{Utf8PlatformPathBuf, Utf8UnixPathBuf};

use crate::{
build::{BuildConfig, BuildStatus, run_make},
diff::Demangler,
jobs::{Job, JobContext, JobResult, JobState, start_job, update_status},
};

Expand All @@ -21,6 +22,7 @@ pub struct CreateScratchConfig {
pub function_name: String,
pub target_obj: Utf8PlatformPathBuf,
pub preset_id: Option<u32>,
pub demangler: Demangler,
}

#[derive(Default, Debug, Clone)]
Expand Down Expand Up @@ -74,7 +76,14 @@ fn run_create_scratch(
.text("diff_label", config.function_name.clone())
.text("diff_flags", diff_flags)
.text("context", context.unwrap_or_default())
.text("source_code", "// Move related code from Context tab to here");
.text("source_code", "// Move related code from Context tab to here")
.text(
"name",
config
.demangler
.demangle(&config.function_name)
.unwrap_or_else(|| config.function_name.clone()),
);
if let Some(preset) = config.preset_id {
form = form.text("preset", preset.to_string());
}
Expand Down
1 change: 1 addition & 0 deletions objdiff-gui/src/jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fn create_scratch_config(
function_name,
target_obj: target_path.clone(),
preset_id: scratch_config.preset_id,
demangler: state.effective_diff_config().demangler,
})
}

Expand Down
Loading