aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda_dump/src
diff options
context:
space:
mode:
Diffstat (limited to 'zluda_dump/src')
-rw-r--r--zluda_dump/src/dark_api.rs3
-rw-r--r--zluda_dump/src/log.rs14
2 files changed, 14 insertions, 3 deletions
diff --git a/zluda_dump/src/dark_api.rs b/zluda_dump/src/dark_api.rs
index b9fd9c2..3ae50ed 100644
--- a/zluda_dump/src/dark_api.rs
+++ b/zluda_dump/src/dark_api.rs
@@ -491,7 +491,8 @@ unsafe fn record_submodules(
if fatbin_file_kind == FATBIN_FILE_HEADER_KIND_PTX {
let decompressed = decompress_kernel_module(fatbin_file);
match decompressed {
- Some(decompressed) => {
+ Some(mut decompressed) => {
+ decompressed.pop(); // remove trailing zero
state.record_new_submodule(module, version, &*decompressed, fn_logger, "ptx")
}
None => fn_logger.log(log::LogEntry::Lz4DecompressionFailure),
diff --git a/zluda_dump/src/log.rs b/zluda_dump/src/log.rs
index a7dc399..b7416af 100644
--- a/zluda_dump/src/log.rs
+++ b/zluda_dump/src/log.rs
@@ -368,7 +368,7 @@ impl Display for LogEntry {
observed,
} => write!(
f,
- "Unexected field {}. Expected: [{}], observed: {}",
+ #"Unexected field {}. Expected one of: {{{}}}, observed: {}"#,
field_name,
expected
.iter()
@@ -381,7 +381,17 @@ impl Display for LogEntry {
arg_name,
expected,
observed,
- } => write!(f, "Unexected argument"),
+ } => write!(
+ f,
+ "Unexpected argument {}. Expected one of: {{{}}}, observed: {}",
+ arg_name,
+ expected
+ .iter()
+ .map(|x| x.to_string())
+ .collect::<Vec<_>>()
+ .join(", "),
+ observed
+ ),
LogEntry::MalformedFunctionName(e) => e.fmt(f),
LogEntry::FunctionParameter { name, value } => write!(f, "{}: {}", name, value),
}